Reputation: 8443
class Foo(object): a = "/admin' b = Foo.a + '/hello'
a refers to a base path. And I want to define the class variable b based on a. How do I achieve this ?
a
b
Upvotes: 1
Views: 79
Reputation: 45039
class Foo(object): a = "/admin' b = a + '/hello'
Upvotes: 4