python: very few named free functions

In python, Most operations are instance/static methods, and the *busiest* operations are operators.

In the “neighborhood”, Free-standing functions aren’t allowed in java/c# but the mainstay of C, Perl and PHP.

— perl-style free functions are a much smaller population in python, therefore important. See the 10-pager P135[[py ref]] —
map(), apply()
min() max()

— advanced free functions such as introspection
repr() str() — related to __repr__() and __str__()
type(), id(), dir()
isinstance() issubclass()
eval() execfile()
getattr() setattr() delattr() hasattr()
range(), xrange()
?yield? not a free-function, but a keyword!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s