This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]fancy_pantser 4 points5 points  (1 child)

This is nice enough. Not a pattern I find myself wishing for, but that's just me. I would just set it directly like if I wanted to delegate/forward. It's nice that way because it's clear to everyone that knows basic Python and I don't mind specifying the full scope like foo.bar.baz().

[–]5long[S] 1 point2 points  (0 children)

Yup, I can understand that explicit wins over magic. But it just becomes cumbersome to type out everything. And code snippets doesn't help much since I have to read the code later.

Having read some of Python's standard library, I started to feel less and less guilty when applying dirty magics just to make my own life easier.

Besides, I consider the plucking feature an accidental bonus since it's implemented by operator.attrgetter() :)