Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question about descriptor
#4
(Jan-08-2024, 07:35 AM)akbarza Wrote: any more opinion?
I think the documentation is clear enough: Python knows how to call __get__ for example because when you write an attribute access such as spam.eggs, it looks in the dictionary of the class of the object spam and if it finds a member named eggs and this member has a __get__() method then it calls the __get__() method.
« We can solve any problem by introducing an extra level of indirection »
Reply


Messages In This Thread
question about descriptor - by akbarza - Jan-07-2024, 11:54 AM
RE: question about descriptor - by Gribouillis - Jan-07-2024, 02:50 PM
RE: question about descriptor - by akbarza - Jan-08-2024, 07:35 AM
RE: question about descriptor - by Gribouillis - Jan-08-2024, 10:29 PM
RE: question about descriptor - by akbarza - Jan-09-2024, 07:00 AM
RE: question about descriptor - by Gribouillis - Jan-09-2024, 07:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Type conversion issue while using Descriptor in Python3 mailnsuresh 1 3,501 May-07-2020, 12:26 PM
Last Post: deanhystad
  strange effect from duplicating a file descriptor Skaperen 1 2,695 Feb-18-2019, 08:20 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020