[Baypiggies] Fwd: [Tutor] what.built-in

Shannon -jj Behrens jjinux at gmail.com
Wed Oct 4 20:59:58 CEST 2006


$ python
Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> __builtins__
<module '__builtin__' (built-in)>
>>> dir(__builtins__)
['ArithmeticError', 'AssertionError', 'AttributeError',
'DeprecationWarning', 'EOFError', 'Ellipsis', 'EnvironmentError',
'Exception', 'False', 'FloatingPointError', 'FutureWarning',
'IOError', 'ImportError', 'IndentationError', 'IndexError',
'KeyError', 'KeyboardInterrupt', 'LookupError', 'MemoryError',
'NameError', 'None', 'NotImplemented', 'NotImplementedError',
'OSError', 'OverflowError', 'OverflowWarning',
'PendingDeprecationWarning', 'ReferenceError', 'RuntimeError',
'RuntimeWarning', 'StandardError', 'StopIteration', 'SyntaxError',
'SyntaxWarning', 'SystemError', 'SystemExit', 'TabError', 'True',
'TypeError', 'UnboundLocalError', 'UnicodeDecodeError',
'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError',
'UserWarning', 'ValueError', 'Warning', 'ZeroDivisionError', '_',
'__debug__', '__doc__', '__import__', '__name__', 'abs', 'apply',
'basestring', 'bool', 'buffer', 'callable', 'chr', 'classmethod',
'cmp', 'coerce', 'compile', 'complex', 'copyright', 'credits',
'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile',
'exit', 'file', 'filter', 'float', 'frozenset', 'getattr', 'globals',
'hasattr', 'hash', 'help', 'hex', 'id', 'input', 'int', 'intern',
'isinstance', 'issubclass', 'iter', 'len', 'license', 'list',
'locals', 'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord',
'pow', 'property', 'quit', 'range', 'raw_input', 'reduce', 'reload',
'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted',
'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr',
'unicode', 'vars', 'xrange', 'zip']

Does that help?

Note that just because everything is an object and because these are
builtins that these are built into "object"; they aren't.  Also note
that not all the builtins are functions.  There's all kinds of stuff.

-jj

On 9/29/06, jim stockford <jim at well.com> wrote:
>
>
> Begin forwarded message:
>
> > From: jim stockford <jim at well.com>
> > Date: September 29, 2006 6:24:31 AM PDT
> > To: tutor at python.org
> > Subject: [Tutor] what.built-in
> >
> > from
> > http://docs.python.org/lib/built-in-funcs.html
> > some functions are always available--the built-in functions.
> >
> > (from elsewhere) everything in python is an object.
> >
> > --------------------
> >
> > hey, from abs() to zip() there's type() and super() and str()
> > and setattr() and ... dir() and... they're the built-ins
> >
> > my question: what.abs()  what.zip() etc.?
> >
> > I think there must be a base object, a la java or Nextstep,
> > that supports these functions. what is it?
> >
> > maybe it's not practical, but it's driving me nuts anyway.
> > thanks in advance.
> >
> > _______________________________________________
> > Tutor maillist  -  Tutor at python.org
> > http://mail.python.org/mailman/listinfo/tutor
> >
>
>
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> http://mail.python.org/mailman/listinfo/baypiggies
>
>
>


-- 
The one who gets the last laugh isn't the one who did the laughing,
but rather the one who did the writing.


More information about the Baypiggies mailing list