Ask for help about class variable scope (Re: Why doesn't a dictionary work in classes?)

Abdur-Rahmaan Janhangeer arj.python at gmail.com
Thu Dec 27 01:07:06 EST 2018


greetings,

1)

Z4 = sum(val for val in XS)

is same as

Z4 = sum(XS)

2)

class Foo()

can also ne written as

class Foo:

3)

in Foo.x you are using the class just to assoxiate some variables with a
name. what is the purpose of tge script / what are you trying to do?

Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius


More information about the Python-list mailing list