FuzzyDonut
FuzzyDonut
14mo
by
Student

Why in python there's nothing truelly private?

14mo ago
ZestyNarwhal
ZestyNarwhal

You can replicate private attribute behaviour by prefixing the attribute name with two underscores. Like, self.__foo = 0

JazzyBiscuit
JazzyBiscuit

OP said nothing is truly private. Which applies here as well, since you can still access these by prefixing class name before them.

SqueakyUnicorn
SqueakyUnicorn

Consider joining Sync, a platform designed to provide personalized learning guidance for coding enthusiasts. Whether you're preparing for interviews or looking to improve your problem-solving skills, Sync is your ultimate companion.

🌟 With Sync, you can:

  1. Get customized guidance to tackle coding problems effectively.
  2. Connect 1:1 with MAANG engineers for mentorship and insider tips.
  3. Collaborate with peers in our WhatsApp community to learn and grow together.

👉 Join our WhatsApp group here: http://bit.ly/3PgKMWD

SqueakyNugget
SqueakyNugget
14mo

What is this supposed to mean?

Discover more
Curated from across