Ignore:
Timestamp:
Jan 31, 2020, 10:23:58 AM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
ef6df21e3783870d5dd988a568b01c19e2ccbbb5
Parents:
a17747d8c42415aaf1eace9c5b94db3a73b73dd1
Message:
towards python3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/python/cart.py

    ra17747 r3fcc98e  
    2020def cartn(sequence, n):
    2121  tocombine=list(itertools.repeat(sequence,n))
    22   return itertools.imap(tuple,xcombine(*tocombine))
     22  return list(map(tuple,xcombine(*tocombine)))
    2323
    2424if __name__=='__main__':
    2525  for i in cartn([1,2,3],4):
    26     print i
     26    print(i)
Note: See TracChangeset for help on using the changeset viewer.