Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain the difference between `@staticmethod` and `@classmethod`.



Explain the difference between `@staticmethod` and `@classmethod`...

Answer / nashiinformaticssolutions

`@staticmethod` is used for methods that don’t require access to the instance (`self`) or class (`cls`). `@classmethod` is used when a method needs access to the class (`cls`), but not the instance (`self`).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

list some of the data science libraries in python

0 Answers  


What is the difference between list and tuples?

0 Answers  


What is the command to debug a python program?

0 Answers  


Give an example to capital first letter of a string?

0 Answers  


What does it mean when pandas form a group?

2 Answers  


What is complex type in python?

0 Answers  


How does numpy arange work?

0 Answers  


Is python duck typed?

0 Answers  


Can we use singleton functionality without making a singleton class in Python?

0 Answers  


Since switch-case is not used in python – what are the replacements for switch statement in python?

0 Answers  


Does python 2.7 come with pip?

0 Answers  


How would you check if MySQLdb is installed?

0 Answers  


Categories