Scott David Daniels <Sc***********@Acm.Org> wrote in
news:40******@nntp0.pdx.net:
Marco Bartel wrote:
rzed wrote:
[...] Do you mean in a context like this?
class Const:
someVal=255
otherVal=0
def blip(Const.someVal):
Should be:
def blip(test=Const.someVal):
i checked this out, and i think its the name you were using:
Const
Nope, it is the missing arg name.
Well, not so much that as an incorrectly formed parameter name. I
can legally do this:
def blip( someVal ):
...
but not this:
def blip( x.someVal ):
=> SyntaxError aimed at the dot.
Since there is no argname to assign a value to, "Const.someVal" is
taken as an identifier for a passed-in parameter. But it seems
(sensibly enough) that an identifier can't contain a '.' character,
which evidently is reserved for a qualifier separator (or some such
term) in that context.
--
rzed