[EMAIL PROTECTED] a écrit :
>
> Bruno Desthuilliers wrote:
>
>>... that's definitively not
>>something I'd store in global.
>
>
> So where would you put it?
You don't have to "put" functions arguments anywhere - they're already
local vars.
def tokenize(text):
do some work
returns or (yields) a list of tokens or whatever
If you want the tokenizer module to work as a self-contained appliction
*too*, then :
if __name__ == '__main__':
text = reads the text from a file or stdin
for token in tokenize(text):
do something with token
HTH
--
http://mail.python.org/mailman/listinfo/python-list