Why no "def A.f (...)"?

Skip Montanaro skip at mojam.com
Wed Aug 18 12:43:25 EDT 1999

    Stefan> Are there sensible reasons (performance, anomalies..) why
    Stefan> function definition is restricted to creating new identifiers in
    Stefan> the current namespace?

The only obvious reasons I can see are

    a. it's perhaps poor taste to add functions to another module (granted,
       no worse taste than adding any other kind of object to another module)
    b. it's easily done with a def following by an assignment statement
    c. it hasn't been considered important enough to warrant modifying the

Skip Montanaro	| http://www.mojam.com/
skip at mojam.com  | http://www.musi-cal.com/~skip/

More information about the Python-list mailing list