3 ms·
That's entirely implementation dependent. For existing libraries I would expect something like def get(self, query): if isinstance(query, template)
by yk 1y ago
That's entirely implementation dependent. For existing libraries I would expect something like
def get(self, query):
if isinstance(query, template):
self.get_template(query)
else:
self.get_old(query) #Don't break old code!
- ewidar 1y agoit would likely be safer to have a safe (accepting Templates) and an unsafe (accepting strings) interface. Now whether maintainers introduce `getSafe` and keep the old behavior intact, or make a breaking change to turn `get` into `getUnsafe`, we will see
- darthwalsh 1y agoAnd they could add deprecation warnings gradually