Nov-19-2018, 01:37 AM
i was recoding the debugtoys module to work with a setup function. then i decided that instead of passing an environment variable name, i would expand the flexibility and pass the result of whatever test the importer wanted to be used, which might not be from environment variables at all. then i was thinking that logic could go around the original import like:
if eval(os.environ['ROSES_ARE_RED']): from debugtoys import pf,pr,pv,sl else: def pf(*a,**o): return def pr(*a,**o): return def pv(*a,**o): return def sl(*a,**o): returnor maybe not. this setup function could also provide the dummy functions when the debugging is disabled. so i am recoding it that way now.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.