Re: Python type system

2023-02-27 Thread Chris Angelico
On Tue, 28 Feb 2023 at 03:29, Weatherby,Gerard wrote: > Beyond Python, I’ve also found duck typing useful in real life. If it walks > like a troll, quacks like a troll … > ... regenerates limbs like a troll... ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Python type system

2023-02-27 Thread Weatherby,Gerard
When I first started transitioning to Python as a Perl replacement, with my Java/C++ baggage, I thought Pythnon had some loosey-goosey type system. I thought int() and str() were casts, not constructors. I now realize Python has a great strong type system. Duck typing. If it walks like a duck, q