Greetings,
I have a class that implements the iterator protocol, and tokenises a
string into a series of tokens. As well as the token, it keeps track of
some information such as line number, source file, etc.
for tokens in Tokeniser():
do_stuff(token)
What I want is to be able to wrap the toke
Greetings,
I want a debugging function with the effect of the function below (in a
seperate module):
def dump(expr):
print expr, '=', eval(expr)
foo = 33
dump('foo')
Of course this fails when called from another module because eval does not
know the globals or locals of the caller. Is the
implementation of PEP 224. The only solution that I can
see is to subclass int.__new__(), since once I have an int all it's
attributes are immutable.
--
Tom Harris
--
http://mail.python.org/mailman/listinfo/python-list
side it. Of course not applicable to Python.
--
Tom Harris
--
http://mail.python.org/mailman/listinfo/python-list
Greetings,
I need a little help with buffer objects. Many Python objects export
the buffer interface, or can be persuaded to create a buffer object
with a buffer() call.
First question, the buffer() function appears very quick. Does it just
wrap the internal pointer and then exit?
Second questio
rather stuck with
unittest, as I have 84 testcases, and I have to make it work tomorrow.
--
Tom Harris BeacyBooks bigpondcom>
--
http://mail.python.org/mailman/listinfo/python-list