add_argument() call, the
wrapper could just handle the usual case (default false, presence of option
sets flag to True). So the signature would be pretty simple - something like:
def add_bool_argument(self, help=None, dest=None):
Mark Russell
. insist on = for new bindings, and := for
rebindings). But that's obviously not reasonable for python.
Mark Russell
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org
On 10 Feb 2006, at 12:45, Nick Coghlan wrote:An alternative would be to call it "__discrete__", as that is the key characteristic of an indexing type - it consists of a sequence of discrete values that can be isomorphically mapped to the integers. Another alternative: __as_ordinal__. Wikipedia
helps a lot with the list-of-names problem
- it nicely delimits the conditional expression for human readers:
return (if self.arg is None then default else self.arg)
In particular it breaks up the misleading grouping return if.
Mark Russell
On Tue, 2005-08-02 at 11:00, Nick Coghlan wrote:
With this hierarchy, the recommended parent class for application errors
becomes Error, ...
And presumably Error could also be the recommended exception for
quick'n'dirty scripts.
Mark Russell
the term bracketing object?
Mark Russell
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
you'd do something like:
IInputStream = interface(file.read, file.readlines)
def foo(f: IInputStream): ...
I can't see that interface() would need much magic - I would guess you
could implement it in python with ordinary introspection.
Mark Russell
is for %digitN producing a microseconds field.
Mark Russell
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com