The Python Oracle

How do I disallow a classmethod from being called on an instance?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Lost Meadow

--

Chapters
00:00 Question
01:05 Accepted answer (Score 3)
03:15 Answer 2 (Score 0)
04:12 Thank you

--

Full question
https://stackoverflow.com/questions/4232...

Question links:
https://github.com/coleifer/peewee/blob/...

Accepted answer links:
[pitfalls]: https://stackoverflow.com/questions/1353...

Answer 2 links:
[__getattribute__]: https://docs.python.org/2/reference/data...
[answer]: https://stackoverflow.com/questions/1922...
[Martijn Pieters]: https://stackoverflow.com/users/100297/m...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #classmethod #peewee #cpython

#avk47