proposed language change to int/int==float (was: PEP0238 lament)

Courageous jkraska1 at san.rr.com
Wed Jul 25 00:05:07 EDT 2001


On 24 Jul 2001 08:35:51 -0400, com-nospam at ccraig.org (Christopher A. Craig) wrote:

>any people have argued that they would like to see the behavior from
>the PEP if Python were a new language.  I disagree.  I would prefer to
>see '/' defined as "exact division" and '//' defined as "truncated
>division" and have types that don't support either raise a TypeError
>if the types don't support the operation in question.  I think this
>parallels existing operations better.

I'd go further: '/' should be exact division, and "div" should be
truncated division, analagous to the way divmod works, except
without the mod.

C//




More information about the Python-list mailing list