Top "Member-variables" questions

Python Class Members

I am just learning Python and I come from a C background so please let me know if I have …

python class member-variables
What is the difference between class and instance attributes?

Is there any meaningful distinction between: class A(object): foo = 5 # some default value vs. class B(object): def __init__(self, …

python attributes member-variables
Private members in Python

How can I make methods and data members private in Python? Or doesn't Python support private members?

python class oop member-variables
Is returning references of member variables bad practice?

The following is said to be better than having First() and Second() as public members. I believe this is nearly …

c++ reference member-variables
C# Member variable inheritance

I'm a little new to C#, but I have a fairly extensive background in programming. What I'm trying to do: …

c# variables inheritance member-variables
Is C++ static member variable initialization thread-safe?

According to following resources, in C++(Specially Visual C++) scoped static variable initialization isn't thread safe. But, global static variables …

c++ multithreading static member-variables
Suppress unused variable warning in C++ => Compiler bug or code bug?

Presently, I am using the following function template to suppress unused variable warnings: template<typename T> void unused(…

c++ templates language-lawyer member-variables
Adding new member variables to python objects?

I have started reading the "Beginning python from novice to professional" by Magnus Lie Hetland, and what struck me today …

python object member-variables
Java Access Abstract Instance variables

I have an abstract class with a variable like follows: public abstract class MyAbstractClass { int myVariable = 1; protected abstract void FunctionThatUsesMyVariable(); } …

java abstract-class member-variables