Greg Ewing writes:
 > Stephen J. Turnbull wrote:
 > > It's a design bug, yes.  The question is, does it conform to
 > > documented behavior?
 > 
 > The 2.7 docs say this about __complex__:
 > 
 >     Called to implement the built-in function complex() ...
 >     Should return a value of the appropriate type.
 > 
 > So the question is whether float is an "appropriate type" when
 > you're expecting a complex.

I probably not say that, but even so my personal taste would be to fix
the docs to describe the current behavior in 2.7.  Evidently somebody
thought "float" was appropriate, or they would have just written
"Returns a complex value."  Stability is more important than catering
to my taste (even if it happens to represent a majority in some sense).

_______________________________________________
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

Reply via email to