3 ms·
Yeah, this could be more pythonic for sure. Setter and getter methods are always a bit iffy in Python, usually their presence in a library doesn’t bode well. T
by orf 7y ago
Yeah, this could be more pythonic for sure. Setter and getter methods are always a bit iffy in Python, usually their presence in a library doesn’t bode well.
They could make some of them work with the same syntax as dictionaries, which would be a good start.
- zbentley 7y ago> usually their presence in a library doesn’t bode well Yuuup. My personal favorite is SendGrid/Twilio's email envelope handling, in which the way you add multiple headers is by .... assigning to an attribute multiple times: mail_object.header = "header 1" mail_object.header = "header 2" mail_object.send() # Sends with headers ["header 1", "header 2"]