[issue27852] itertools -> flatten_all()

2016-08-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I think there is no need add this function in itertools. > And due to this details it may be not worth to add it as a recipe. Sorry YoSTEALTH, I concur with Serhiy on both points and am going to pass on this proposal. That said, I encourage you to post

[issue27852] itertools -> flatten_all()

2016-08-25 Thread YoSTEALTH
YoSTEALTH added the comment: Currently there is flatten() function in itertools Recipes section. This is what it does: -> a = ['one', 'plus', [b'two', b'three'], ['four', ('five', (1, {'e', 'ee'}, (2, (3, ))), ['six'])], generator()] <- ['o', 'n', 'e', 'p', 'l', 'u', 's', b'two', b'three', 'fou

[issue27852] itertools -> flatten_all()

2016-08-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In proposed implementation str and bytes are not flattened. What about bytearray? array.array? memoryview? For different tasks they can be considered atomic or as collections. There are such much task specific details and the implementation is such simple, t

[issue27852] itertools -> flatten_all()

2016-08-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger components: +Documentation nosy: +rhettinger priority: normal -> low ___ Python tracker ___ __

[issue27852] itertools -> flatten_all()

2016-08-24 Thread YoSTEALTH
New submission from YoSTEALTH: # Maybe a Recipe for itertools from collections.abc import Iterable def flatten_all(iterable): # -> 'one' # <- ['one'] # -> ['one', [b'two', b'three'], ['four', ('five', (1, {'e', 'ee'}, (2, (3, ))), ['six'])], generator()] # <- ['one', b'two', b'