Steven D'Aprano <[email protected]> added the comment:
Matthew Barnett wrote:
> Matthew Barnett <[email protected]> added the comment:
>
> I think I need a show of hands.
>
> Should the default be old behaviour (like re) or new behaviour? (It might be
> old now, new later.)
>
> Should there be a NEW flag (as at present), or an OLD flag, or a VERSION
> parameter (0=old, 1=new, 2=?)?
I prefer Antoine's suggested spelling, COMPAT, rather than OLD.
How would you write the various options? After the transition is easy:
# Get backwards-compatible behaviour:
compile(string, COMPAT)
compile(string, VERSION0)
# Get regex non-compatible behaviour:
compile(string) # will be the default in the future
compile(string, VERSION1)
But what about during the transition, when backwards-compatible
behaviour is the default? There needs to be a way to turn compatibility
mode off, not just turn it on.
# Get backwards-compatible behaviour:
compile(string) # will be the default for a release or two
compile(string, COMPAT)
compile(string, VERSION0)
# Get regex non-compatible behaviour:
compile(string, VERSION1)
So I guess my preference is VERSION0 and VERSION1 flags, even if there
is never going to be a VERSION2.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue2636>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com