Phobos packages a bit confusing

bearophile bearophileHUGS at lycos.com
Wed Dec 2 08:24:38 PST 2009


retard:
> Also IIRC Python has built-in print() command. What if I want to 
> redefine this to mean printing to a graphical quake like game console.

In Python3 there is a built-in print function, that is a reference to a callable object. So you just need to redefine it, like this:

def print(...):
  # my stuff

Or just:
def foo(): ...
print = foo

Bye,
bearophile



More information about the Digitalmars-d mailing list