Filtering out non-readable characters
Peter Hansen
peter at engcorp.com
Mon Jul 18 20:19:29 EDT 2005
Michael Ströder wrote:
> Peter Hansen wrote:
>
>>>>>''.join(chr(c) for c in range(65, 91))
>>
>>'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
>
>
> Wouldn't this be a candidate for making the Python language stricter?
Why would that be true? I believe str.join() takes any iterable, and a
generator (as returned by a generator expression) certainly qualifies.
-Peter
More information about the Python-list
mailing list