Re: [Python-Dev] argparse ugliness

2010-03-08 Thread Mark Russell
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

Re: [Python-Dev] PEP for Better Control of Nested Lexical Scopes

2006-02-21 Thread 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

Re: [Python-Dev] PEP for adding an sq_index slot so that any object, a or b, can be used in X[a:b] notation

2006-02-11 Thread Mark Russell
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

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-21 Thread Mark Russell
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

Re: [Python-Dev] Pre-PEP: Exception Reorganization for Python 3.0

2005-08-02 Thread 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

Re: [Python-Dev] Terminology for PEP 343

2005-07-01 Thread 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

Re: [Python-Dev] Updated Monkey Typing pre-PEP

2005-01-20 Thread Mark Russell
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

Re: [Python-Dev] redux: fractional seconds in strptime

2005-01-14 Thread 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