[Python-Dev] TextIO seek and tell cookies
Guido van Rossum
guido at python.org
Mon Sep 26 00:18:51 EDT 2016
More information about the Python-Dev mailing list
Mon Sep 26 00:18:51 EDT 2016
- Previous message (by thread): [Python-Dev] TextIO seek and tell cookies
- Next message (by thread): [Python-Dev] TextIO seek and tell cookies
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Be careful though, comparing these to plain integers should probably be allowed, and we also should make sure that things like serialization via JSON or storing in an SQL database don't break. I personally think it's one of those "learn not to touch the stove" cases and there's limited value in making this API idiot proof. On Sun, Sep 25, 2016 at 9:05 PM, Nick Coghlan <ncoghlan at gmail.com> wrote: > On 26 September 2016 at 10:21, MRAB <python at mrabarnett.plus.com> wrote: >> On 2016-09-26 00:21, Ben Leslie wrote: >>> Are there any downsides to this? I've made some progress developing a >>> patch to change this functionality. Is it worth polishing and >>> submitting? >>> >> An alternative might be a subclass of int. > > It could make sense to use a subclass of int that emitted deprecation > warnings for integer arithmetic, and then eventually disallowed it > entirely. > > Cheers, > Nick. > > -- > Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org -- --Guido van Rossum (python.org/~guido)
- Previous message (by thread): [Python-Dev] TextIO seek and tell cookies
- Next message (by thread): [Python-Dev] TextIO seek and tell cookies
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list