in reply to Re: What's the correct and succinct way to refer to object attribute in (informal) description?
in thread What's the correct and succinct way to refer to object attribute in (informal) description?

> Peeking into attributes breaks encapsulation

That's true, and I always defended the argument.

But from my (limited) experience with Python it seems they generally don't care.

Why is it so? Do they have a good a posteriori mechanism to override the attribute with accessor logic to fix potential problems?

Or do they just succeed by being less anal?

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

  • Comment on Re^2: What's the correct and succinct way to refer to object attribute in (informal) description?

Replies are listed 'Best First'.
Re^3: What's the correct and succinct way to refer to object attribute in (informal) description?
by choroba (Cardinal) on Jun 10, 2024 at 14:37 UTC
    StackOverflow discussion about public attributes in Python.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
Re^3: What's the correct and succinct way to refer to object attribute in (informal) description?
by Fletch (Bishop) on Jun 10, 2024 at 14:52 UTC

    Python also has no true read only values ("constants" are named with all caps but there's nothing mechanically in the language itself stopping code from changing the values they point to) so my days of not respecting their design chops have certainly come to a middle.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.