learning python ...
Michael F. Stemper
mstemper at gmail.com
Mon May 24 11:54:56 EDT 2021
On 24/05/2021 09.32, Rob Cliffe wrote:
> One day you may want to write (as you can in Python)
>
> class int(int):
> .....
>
> to shadow the built-in 'int' type with a modified version. I'm not
> suggesting this has many real world applications, but it can be fun to
> play with. Python has a "consenting adults" policy: it assumes that if
> you do something weird, you're doing it deliberately, and it doesn't try
> to stop you. I am sure after a little more experience with Python you
> will remember the commonest built-in types (int, float, list, dict, str
In my early days of writing python, I created lists named "list",
dictionaries named "dict", and strings named "str". I mostly know better
now, but sometimes still need to restrain my fingers.
--
Michael F. Stemper
Nostalgia just ain't what it used to be.
More information about the Python-list
mailing list