Hi all,
I have a situation where in a module I have a function that creates classes
like this (obviously the real deal is more complicated than this)
def foo_maker(x):
class _Foo:
def bar(self): print x
return _Foo
I also want to have a "default version" of the class in the module:
Foo = foo_maker(0)
so that a user can do:
import mymodule
x = Foo()
x.bar()
However, pylint thinks that Foo is a constant in the module (which it kind of
is ...) and wants it to be written in all upper case. That doesn't make much
sense in this case though (x = FOO() looks wrong in so many ways). Is there
any way to tell pylint to use the naming convention for classes even if
something looks like a constant, preferably only in this one case?
--
Stefan Parviainen
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects