[Python-Dev] python 3.0, tp_compare not used for == test? (original) (raw)
Mark Dickinson dickinsm at gmail.com
Mon Feb 2 13:10:39 CET 2009
- Previous message: [Python-Dev] python 3.0, tp_compare not used for == test?
- Next message: [Python-Dev] python 3.0, tp_compare not used for == test?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Feb 2, 2009 at 11:38 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
That's what the -3 command line switch is for - it sets a boolean flag that C code can check to see if it should emit warnings for things that are going to break in Python 3.x.
Understood. My worry was that we'd get a lot of false positives--- i.e., warnings about pieces of Python 2.7 that don't need to change. But I guess that's okay.
There's already at least one example of its use in typeobject.c (relating to inheritance of the tphash slot). There are a few other examples about the place (e.g. I believe that when -3 is defined the return value of dict.keys and friends is changed to a list subclass that warns on certain operations that have different semantics in 3.x).
Thanks for the pointers. I'll take a look and see if I can come up with a patch. But I'd like to complete the rest of the cmp removal stuff first.
Mark
- Previous message: [Python-Dev] python 3.0, tp_compare not used for == test?
- Next message: [Python-Dev] python 3.0, tp_compare not used for == test?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]