[Tutor] redefining builtin function

Sean 'Shaleh' Perry shalehperry@home.com
Wed, 12 Sep 2001 12:57:35 -0700 (PDT)


Seems to work here.

$ cat test.py
#! /usr/bin/python

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

round(5.0, 1)
round(3.23)
$ python test.py 
5.0 1
5.0
3.23 0
3.0

This is under 1.5.2.