Open embray opened 2 months ago
Thank you! Yeah, this makes sense, but we definitely don't want an extra dependency :)
Maybe we can vendor (a subset of) peekable
if that makes implementing this easier. Tests should also ensure multi-dotted names such as my.corporate.app.translations.execute()
work :)
Great, given the go-ahead I'll rework this. peekable() is nice but I don't think it's really needed either.
I like how your example pokes fun at the "Enterprise-y" nature of this ;). But I swear I had a really good use case for this and wanted to make it work.
Proof of concept fix for #774. I did this quickly using
peekable()
from the more-itertools package, but if adding a new dependency just for this is (understandably) undesirable, it could be fixed just as easily with slight improvements to the generate tokens loop (in fact I had a version of that working earlier, but it gets a bit hairier with the nested case).This would conflict with #1127, so if this is otherwise acceptable as a feature can rebase on top of that and without using more-itertools.