KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there any way to have a property and a method with the same name? I mean a property that can be used the usual way and to be callable at the same time? Like this: >>> b = Book() >>> b.pages 123 >>> b.pages() 123 >>> b.pages(including_toc=False) 123 >>> b.pages(including_toc=True) 127
Tags (comma-separated)
Save Edits
Cancel