Pep 238 Why new // operator (Non-integer Division)

Tim Peters tim.one at home.com
Sat Mar 17 04:50:30 EST 2001


[Alex Martelli]
> So what's so terrible about non-infix notation, a builtin div(a,b) [and
> mod(a,b) too since we're at it...?].  Sure, infix can be handy --

Infix is also a speed issue in Python, since syntax is fixed but builtin
names are not reserved; so the speed freaks will surely argue for syntax.

> but then this might be the occasion to steal a leaf from Haskell's
> book... let any 2-operand function be used as an infix operator
> (possibly with some stropping if that is needed to disambiguate
> syntax).

I'll let someone else channel Guido on this one.  Who's up to the challenge?

    x delattr "attr"
    lamdba x: x%2 filter x
    "channel.txt" open "w"
    3 complex ("beef" int 16)

it's-often-not-pretty-in-haskell-either-ly y'rs  - tim





More information about the Python-list mailing list