[MERGE] Improvements to is_ignored, factored out glob stuff.
Jan Hudec
bulb at ucw.cz
Thu Jan 19 06:08:25 GMT 2006
On Wed, Jan 18, 2006 at 10:11:14 +1100, Robert Collins wrote:
> On Tue, 2006-01-17 at 16:44 -0600, John Arbash Meinel wrote:
>
> > > +class replacer(object):
> > > + """Do a multiple-pattern substitution.
> > > +
> > > + The patterns and substitutions are combined into one, so the result of
> > > + one replacement is never substituted again. Add the patterns and
> > > + replacements via the add method and then call the object. The patterns
> > > + must not contain capturing groups.
> > > + """
> > > + _expand = re.compile(ur'\\&')
> > > + def __init__(self):
> > > + self._pat = None
> > > + self._pats = []
> > > + self._funs = []
> > > +
> >
> > I think PEP8 says there should be a blank line between the final """ of
> > the doc string, and the _expand, and then another one before def. But
> > Robert is the PEP8 guru/grammer nazi :)
>
> in a class - yes. One line between each class scope thing.:
>
> class Foo(object):
> """Docstring."""
>
> class_scope = None
>
> def another_class_scope(self, foo):
> """docstring."""
>
> def another_another(self):
> """docstring."""
>
> also note that classes should be CapitalisedWords. In the rest of this
> file in the patch there are double-lines between methods - this is not
> PEP8.
The rest of that file (glob.py) does not contain any methods, but
module-level functions. And PEP8 says about them:
| Separate top-level function and class definitions with two blank lines.
I'd say perhaps the functions should be separated by double blank lines
to logical blocks, but not on basis of PEP8.
--
Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060119/427a6fdb/attachment.pgp
More information about the bazaar
mailing list