Top "Class-method" questions

Methods that are called on a class instead of on an object.

Cannot call a class method with [self theMethod:]

I am trying to write a class method in Objective C. The project builds fine when I declare the method. …

objective-c methods class-method
When should I use @classmethod and when def method(self)?

While integrating a Django app I have not used before, I found two different ways used to define functions in …

python language-lawyer class-method method-dispatch language-details
Static classes in Python

I once read (I think on a page from Microsoft) that it's a good way to use static classes, when …

python class static instance class-method
__getattr__ for static/class variables in python

I have a class like: class MyClass: Foo = 1 Bar = 2 Whenever MyClass.Foo or MyClass.Bar is invoked, I need a …

python class-method getattr
Calling class methods via class name vs self

Suppose we have a class named Calculator. There's a class method in it, called runProgram. If I wanted to call …

objective-c class-method
Call a class method from within that class

Is there a way to call a class method from another method within the same class? For example: +classMethodA{ } +classMethodB{ //…

objective-c class-method
Python - how can I get the class name from within a class method - using @classmethod

I have the following code: class ObjectOne(object): @classmethod def print_class_name(cls): print cls.__class__.__name__ def print_…

python class-method
Various errors in code that tries to call classmethods

I have this code: class SomeClass: @classmethod def func1(cls,arg1): #---Do Something--- @classmethod def func2(cls,arg1): #---Do Something--- # …

python class-method
ARC Semantic Issue: No visible @interface for Class declares the selector

Pretty basic stuff but i am unable to troubleshoot where the problem is. In my project, i have a class …

iphone ios objective-c xcode class-method
Can a python @classmethod be inherited?

For example, I have a base class and a derived class: >>> class Base: ... @classmethod ... def myClassMethod(klass): ... …

python inheritance class-method