On 12 January 2014 19:30, Emile van Sebille <emile at fenx.com> wrote: > len(open('chars','wb').write("".join(map (chr,range(256)))).read()) Python 2: >>> len(open('chars','wb').write("".join(map (chr,range(256)))).read()) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'NoneType' object has no attribute 'read' I could be facetous and say "None.read", but more seriously, what are you trying to say here? How do I write a 256-byte file with one byte for each value? bytes(range(256)) gives you the bytestring you want. I simply don't see your point here. >> And yet I still don't follow what you *want*. Unless it's that b'%d' % >> (12,) must work and give b'12', and nothing else is acceptable. > > Nothing else is ideal. I'll go that route if I have to. I understand that in the real world you go with what works, but in the development stage you fight for the ideal. :) OK, but can you fight by giving arguments as to why it's better than the plethora of alternatives that have been suggested? Or counter-arguments to the objections that have been raised to the proposal? Paul
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4