PEP0238 lament

Moshe Zadka moshez at zadka.site.co.il
Mon Jul 23 00:13:26 EDT 2001


On Sun, 22 Jul 2001 17:57:45 -0700, Erik Max Francis <max at alcyone.com> wrote:

> That's quite different from the current case, where we're talking about
> an operation that will return different types depending on the inputs. 
> I don't see any good reason to change the current behavior; / means
> division over the types that are passed in.

It does? I fail to see why people assume that operations *have* to return
the type of their operands. In this case, succumbing to this rule means
that we violate much more important, IMHO, rules, like

>>> a==b
1
>>> c==d
1
>>> a/c == b/d
0

(the part before that is:
Python 2.1 (#1, Apr 27 2001, 01:24:08)
[GCC 2.95.3 20010219 (prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> a,b,c,d=1,1.,2,2.

Of course)

> If you pass in ints, you want integer division.

I do?

> Sorry, lazily pasted something into my .sig database.  It was meant to
> be:
> 
> 	http://www.alcyone.com/max/lang/esperanto/

Thanks!
-- 
gpg --keyserver keyserver.pgp.com --recv-keys 46D01BD6 54C4E1FE
Secure (inaccessible): 4BD1 7705 EEC0 260A 7F21  4817 C7FC A636 46D0 1BD6
Insecure (accessible): C5A5 A8FA CA39 AB03 10B8  F116 1713 1BCF 54C4 E1FE




More information about the Python-list mailing list