Steven D'Aprano added the comment:

The demo code you give seems to be working perfectly correctly. I don't think 
anything here is a bug.

(1) You are working with a dict, not a tuple.

(2) The potint.__repr__ method does NOT have a bug.

(3) de['four'] is NOT an int, it is a potint object, just as you set. It only 
looks like an int when you print it because that's what the __repr__ does.

To see what the object really is, call:

type(de['four'])

and you will see it is a potint.


And I have no idea what you think is wrong with string without quotation marks, 
it works correctly in the demo.


I'm going to close this bug report as Works For Me. If you disagree, please 
re-open it with more information.

----------
nosy: +steven.daprano
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31514>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to