A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-April/023251.html below:

[Python-Dev] Re: [Python-checkins] python/dist/src/Objects complexobject.c,2.57,2.58

[Python-Dev] Re: [Python-checkins] python/dist/src/Objects complexobject.c,2.57,2.58Tim Peters tim.one@comcast.net
Mon, 15 Apr 2002 00:33:16 -0400
"""
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv7877

Modified Files:
	complexobject.c
Log Message:
SF bug #543387.

Complex numbers implement divmod() and //, neither of which makes one
lick of sense.  Unfortunately this is documented, so I'm adding a
deprecation warning now, so we can delete this silliness, oh, around
2005 or so.

Bugfix candidate (At least for 2.2.2, I think.)
"""

Does it make sense to deprecate divmod() and // for complex numbers while
leaving % intact?

    x % y == x - y * math.floor((x/y).real)

makes exactly as much sense to me (approximately none) as

    x // y == math.floor((x/y).real)

made.  Python's definitions of % and // make great sense for integral types,
but they start to fall apart for floats, and complexes are right out.





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4