[Tutor] ?????

A.T.Hofkamp a.t.hofkamp at tue.nl
Mon May 25 16:31:08 CEST 2009


Alan Gauld wrote:
> Even if you use the other suggestions to prove its 
> callable that doesn't mean you can do this:
> 
>> ????  print sys.x()
> 
> If the callable takes parameters then this will fail.
> You need to know quite a lot more about what you 
> are calling and that is a non trivial task in the general case.

Not to mention it is inherently dangerous to call arbitrary functions without 
understanding what they are doing.

For example, you may lose your entire home directory.
(shutil.rmtree can do that with just one call)


Albert


More information about the Tutor mailing list