Author Ricyteach
Recipients Ricyteach, eric.smith
Date 2018-03-26.16:57:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522083432.07.0.467229070634.issue33141@psf.upfronthosting.co.za>
In-reply-to
Content
Eric, looking at the PR; note that if you do this for the __set_name__ check:

    if inspect.ismethoddescriptor(self.default):

...an object like the one below will not get its __set_name__ called, even though PEP 487 says it should:

class D:
	def __set_name__(self, o, n):
		self.name = n

class C:
	d: int = D()

if __name__ == "__main__":
	print(f"C.d.name = {C.d.name}") # __set_name__ was called
	assert inspect.ismethoddescriptor(C.d) # Error
History
Date User Action Args
2018-03-26 16:57:12Ricyteachsetrecipients: + Ricyteach, eric.smith
2018-03-26 16:57:12Ricyteachsetmessageid: <1522083432.07.0.467229070634.issue33141@psf.upfronthosting.co.za>
2018-03-26 16:57:12Ricyteachlinkissue33141 messages
2018-03-26 16:57:12Ricyteachcreate