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

Can we use python in linux?

0 Answers  


Difference between pass and continue in python?

0 Answers  


How do you create a dictionary which can preserve the order of pairs?

0 Answers  


How do you protect python source code?

0 Answers  


What are the components of python memory manager?

0 Answers  


Write a command to convert a string into an int in python.

0 Answers  


What is setup script?

0 Answers  


What are python slots?

0 Answers  


What is indexing? Explain with an example

0 Answers  


I am from non technical Background. In how many days I can learn the python? and What I need to do for that?

0 Answers  


What is flask & its benefits?

0 Answers  


Which is better python or r?

0 Answers  


Categories