[Pythonmac-SIG] Re: redefining builtin function

Christopher Smith csmith@blakeschool.org
Wed, 12 Sep 2001 16:18:32 -0500


shalehperry@home.com writes:
>Seems to work here.

hmm...but not here.  Here is my IDE header

Python 2.1.1 (#97, Aug  2 2001, 21:56:33)  [CW CARBON GUSI2 THREADS]
Type "copyright", "credits" or "license" for more information.
>>>

I tried pasting the following script (now like yours) into a fresh 
script window of a fresh session and still get the AttributeError.

####
def round(x,n=0):
	return __builtins__.round(x,n)

print round(1.23,1)
####

No problem in the interactive window, though. :-(

/c