qualifying built-in functions

Jp Calderone exarkun at intarweb.us
Thu May 1 18:42:01 EDT 2003


On Fri, May 02, 2003 at 12:10:18AM +0200, Dominic Chambers wrote:
> I just wrote a function accepting min and max parameters, and then tried
> using the built-in max function, which quite reasonably told me:
> 
> TypeError: 'int' object is not callable
> 
> For know I can rename max to maxVal, or something, but I am interested
> in knowing whether there is a way to qualify built-in functions so I
> don't need to do this. Hardly critical, I know, but interesting none the
> less.

  __builtins__.max

  (Not that I'd recommend actually using this just to avoid name
collisions).

  Jp

-- 
#!/bin/bash
( LIST=(~/.sigs/*.sig)
  cat ${LIST[$(($RANDOM % ${#LIST[*]}))]}
  echo -- $'\n' `uptime | sed -e 's/.*m//'` ) > ~/.signature
-- 
 up 42 days, 19:04, 4 users, load average: 0.35, 0.16, 0.19





More information about the Python-list mailing list