R. David Murray <rdmur...@bitdance.com> added the comment:

Yes.  However, if None were a valid value for mode, then the would would 
instead do something like:

SENTINEL = object()

class GZipFile...

    def __init__(self, filename=None, mode=SENTINEL, ...

and then where None currently appears in the logic of the method, mode would be 
checked against SENTINEL to see if no value had been passed to the mode 
argument.

Thus the presence of None in the __init__ signature actually indicates that 
None is explicitly *not* a valid value for mode (and thus can safely be used as 
a sentinel value).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10392>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to