[Python-Dev] PEP 208 comment

M.-A. Lemburg mal@lemburg.com
Sat, 06 Jan 2001 16:15:27 +0100


"Martin v. Loewis" wrote:
> 
> I just studied PEP 208 for the first time. Overall, it seems all
> natural and nice, but there is one one aspect I'd like to see changed:
> the naming of the type flag.
> 
> Currently, it is called Py_TPFLAGS_NEWSTYLENUMBER. IMHO, nothing in a
> program should be called "new". The flag will still be there five
> years from now, but it won't be new anymore. Also, while the flag
> indicates that style of the numbers is new, it does not say what it
> does. So I propose to rename it; if nobody finds a better name, I
> propose to call it Py_TPFLAGS_UNCOERCED.

Given that the design could well be applied to other slots as
well, I think you've got a point there. The idea behind the
flag was to signal that slots will no longer make object type
assumptions which they could previously. Right now, only numeric
types support this feature. In the future I could imaging
strings and other types involving coercion would also want
to use the feature.

Given this design idea, how about calling the flag
Py_TPFLAGS_CHECKTYPES ?!

-- 
Marc-Andre Lemburg
______________________________________________________________________
Company:                                        http://www.egenix.com/
Consulting:                                    http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/