Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks Alex, for this inside view of *object*. I hope the gain in space was worth the effort. I still find it counter-intuitive that (a) the base class of the object system does not support one of the basic features of OO - instance attributes; and (b) this feature all of a sudden springs into existence with any non-sensical derived class *class Foo(object): pass*, which I find myself using more than often just to get instance attributes.
      singulars
    2. CO@Thomas, are you equally surprised that Object in Java "does not support one of the basic features of OO" in exactly the same way? Its direct instances don't have instance attributes either. C# is the same, I believe. Since (and this is REALLY a basic feature of OO's: Liskov's Principle!) no subclass can take away something that's in the superclass, to satisfy your intuition would actually cost infinite memory: a dict should then have a __dict___... and THAT dict should of course have its OWN __dict__... and it can NEVER, NEVER stop. Your intuition's misleading you *A LOT*!-)
      singulars
    3. CO@Alex Ok, I hear you. But maybe this would all be possible if the \_\_dict\_\_'s of lean objects were lazy?! I actually could envision myself wanting to annotate the \_\_dict\_\_ of a \_\_dict\_\_ of an *object* instance with a little attribute, and it would be perfectly enough for me if this \_\_dict\_\_ would only spring into existence when I first assign to it. How is that?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload