can't add variables to instances of built-in classes

Lawrence D’Oliveiro lawrencedo99 at gmail.com
Thu Aug 4 19:57:04 EDT 2016


On Thursday, August 4, 2016 at 3:07:17 PM UTC+12, Chris Angelico wrote:
> On Thu, Aug 4, 2016 at 12:34 PM, Lawrence D’Oliveiro wrote:
>> On Thursday, July 21, 2016 at 2:29:53 PM UTC+12, Chris Angelico wrote:
>>
>>> Using __slots__ basically takes your object down to the level of a
>>> Java one.
>>
>> Is Java like a bogeyman you use to scare people with if they don’t write
>> Python code the way you like it?
> 
> LOL! Not really; it's just that Java's objects are way less featured
> than Python's.

Using Java as an example of how it can keep you out of trouble where Python won’t is fine; using it as a stick to commit personal attacks on people is not.



More information about the Python-list mailing list