l back to the more general 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=No
guage I would probably also make it an error to use = to
do rebinding (i.e. 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
htt
NoteErrors()
for item in items:
if too_big(item):
err("Too big")
if too_small(item):
err("Too small")
if err.had_error:
print "Some items were out of range"
Any chance of := (and rem
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 d
me.
I think that requriing parens 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
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 script
ods, so how about 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
ad, file.readlines)): ...
For commonly used subsets of course 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 imp
database).
My vote is for %N 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
ere's a need for it,
add a way to say "this adaptor can be used as part of a
transitive chain"
Mark Russell
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http
10 matches
Mail list logo