[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

cvs2svn and global variables

From: Max Bowsher <maxb_at_ukf.net>
Date: 2003-11-07 12:11:24 CET

I've just been looking at Kim Lester's debug-messages patch, and I thought
it would be neater if, rather than:

------------------
if debug:
  print "foo"
------------------

to have:

------------------
debug = 0

def dbg(msg):
  if debug:
    print msg

...

dbg "foo"
------------------

This does involve adding another global variable, though, and given that
almost all other global state is wrapped into a context (ctx) object that is
passed around, I thought it better to ask first.

Opinions?

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 7 12:12:22 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.