Mercurial > kallithea
comparison rhodecode/lib/compat.py @ 2552:e8650fbc4d4e beta
Moved BytesIO into compat because of py25 compatibility issue
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 06 Jul 2012 00:01:09 +0200 |
parents | 775a7672d363 |
children | e9e7c40b4f1a |
comparison
equal
deleted
inserted
replaced
2551:968c84475f73 | 2552:e8650fbc4d4e |
---|---|
392 result = [[]] | 392 result = [[]] |
393 for pool in pools: | 393 for pool in pools: |
394 result = [x + [y] for x in result for y in pool] | 394 result = [x + [y] for x in result for y in pool] |
395 for prod in result: | 395 for prod in result: |
396 yield tuple(prod) | 396 yield tuple(prod) |
397 | |
398 | |
399 #============================================================================== | |
400 # BytesIO | |
401 #============================================================================== | |
402 | |
403 try: | |
404 from io import BytesIO | |
405 except ImportError: | |
406 from cStringIO import StringIO as BytesIO |