flatten tuple

John Hunter jdhunter at nitace.bsd.uchicago.edu
Mon Apr 22 22:11:46 EDT 2002


>>>>> "Delaney," == Delaney, Timothy <tdelaney at avaya.com> writes:

    >> I want to be able to create a new tuple, which is the expanded
    >> and flattened version x, so that if an element of x is a key of
    >> m, then the new list has that value instead of the key value .
    >> In the example

    Delaney> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/121294
    Delaney> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/118845

Thanks for the tips -- these look helpful.  

It appears that I can not use the yield features of generators with
2.1.3.  I tried 'from __future__ import generators' but still got a
Syntax Error on each of the yield lines.  Is this feature only
supported in the 2.2 line, even with the __future__ ?

It may be time to upgrade my python soon...

Thanks,
John Hunter





More information about the Python-list mailing list