Message307197
# fail.py
def main():
patch = './a'
f = open(patch, 'r')
a = getattr(f,'encoding','ascii')
print(str(a))
if __name__ == "__main__":
main()
---
$ touch a
$ python fail.py
It still prints out 'None' instead of 'ascii'. This issue is fixed in python3. |
|
Date |
User |
Action |
Args |
2017-11-29 02:18:28 | darkdragon-001 | set | recipients:
+ darkdragon-001 |
2017-11-29 02:18:28 | darkdragon-001 | set | messageid: <1511921908.2.0.213398074469.issue32163@psf.upfronthosting.co.za> |
2017-11-29 02:18:28 | darkdragon-001 | link | issue32163 messages |
2017-11-29 02:18:27 | darkdragon-001 | create | |
|