where does 'del' come from?

sragsdale at my-deja.com sragsdale at my-deja.com
Tue Jun 8 04:25:17 CEST 1999


A fairly academic question, but I'm curious nonetheless.  Where is 'del'
defined?  Functions like 'join' are obviously in the string package,
'range' is a builtin, but I can't seem to find 'del' anywhere.

Python 1.5.2 (#12, Jun  2 1999, 19:23:30) [C] on irix646
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> dir(__builtins__)
['ArithmeticError', 'AssertionError', 'AttributeError', 'EOFError',
'Ellipsis', 'EnvironmentError', 'Exception', 'FloatingPointError',
'IOError', 'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt',
'LookupError', 'MemoryError', 'NameError', 'None',
'NotImplementedError', 'OSError', 'OverflowError', 'RuntimeError',
'StandardError', 'SyntaxError', 'SystemError', 'SystemExit',
'TypeError', 'ValueError', 'ZeroDivisionError', '__debug__', '__doc__',
'__import__', '__name__', 'abs', 'apply', 'buffer', 'callable', 'chr',
'cmp', 'coerce', 'compile', 'complex', 'delattr', 'dir', 'divmod',
'eval', 'execfile', 'exit', 'filter', 'float', 'getattr', 'globals',
'hasattr', 'hash', 'hex', 'id', 'input', 'int', 'intern', 'isinstance',
'issubclass', 'len', 'list', 'locals', 'long', 'map', 'max', 'min',
'oct', 'open', 'ord', 'pow', 'quit', 'range', 'raw_input', 'reduce',
'reload', 'repr', 'round', 'setattr', 'slice', 'str', 'tuple', 'type',
'vars', 'xrange']
>>> range
<built-in function range>
>>> del
  File "<stdin>", line 1
    del
       ^
SyntaxError: invalid syntax


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




More information about the Python-list mailing list