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

Are tuples hashable?

0 Answers  


What does echo do python?

0 Answers  


Please explain when is the python decorator used?

0 Answers  


As python is more suitable for the server-side application, it is very important to have threading implemented in your server code. How can you achieve that in python?

0 Answers  


Tell me the use of the split function in python?

0 Answers  


How can you create empty numpy array in python?

0 Answers  


What is Flask and explain its benefits?

2 Answers  


Can python replace bash?

0 Answers  


What are the best sites to learn python?

0 Answers  


How can you create a copy of an object in python?

0 Answers  


What are the steps required to make a script executable on Unix?

1 Answers  


What is thread join in python?

0 Answers  


Categories