py – 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]] —
del(…)
len(..)
map(), apply()
open() 
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!

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s