This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ben11kehoe
Recipients barry, ben11kehoe
Date 2022-01-09.03:49:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641700150.52.0.0928533331842.issue46307@roundup.psfhosted.org>
In-reply-to
Content
I opened a PR. By default, it raises an exception if there's an invalid identifier; there's a keyword argument raise_on_invalid to control that.

The implementation I have adds them to a set first, which means the order is not guaranteed. I'm of two minds about this: if there's a big template, you want to gather the identifiers in a set so uniqueness is checked immediately and O(1) and without duplication. On the other hand, if templates are never very big, you could build a list (in order) and check it, O(N) style, or build a duplicate list and set in parallel. Or build a big list and check it at the end.

I kind of think ordering doesn't matter? What would someone do with that information?
History
Date User Action Args
2022-01-09 03:49:10ben11kehoesetrecipients: + ben11kehoe, barry
2022-01-09 03:49:10ben11kehoesetmessageid: <1641700150.52.0.0928533331842.issue46307@roundup.psfhosted.org>
2022-01-09 03:49:10ben11kehoelinkissue46307 messages
2022-01-09 03:49:10ben11kehoecreate