Hi Brian,
It sounds like a high quality third-party library that has both a multiset
implementation and the itertools you needed would fulfill most of your
requirements?
Code in the standard library isn't magically of higher quality. Compare eg
standard library dataclasses with dataclassy.
As a
Since Python has built-in syntax for interpolated strings, I believe it's a
good area to idea to extend it to pattern matching, like so:
def unquote(string: str) -> str:
match string:
case f'"{value}"':
return value
case f"'{value}'":
Tushar Sadhwani writes:
> Since Python has built-in syntax for interpolated strings, I
> believe it's a good area to idea to extend it to pattern matching,
> like so:
>
> def unquote(string: str) -> str:
> match string:
> case f'"{value}"':
> return
Stephen J. Turnbull wrote:
> I think this is a pretty unconvincing example. While people seem to
> love to hate on regular expressions, it's hard to see how that beats
> def unquote(string: str) -> str:
> m = re.match(r"^(?:"(.*)"|'(.*)'|(?Pvalue3))$", string)
RegEx feels overkill for thi
Sorry, I accidentally sent before I was done.
Tushar Sadhwani writes:
> Since Python has built-in syntax for interpolated strings, I
> believe it's a good area to idea to extend it to pattern matching,
> like so:
>
> def unquote(string: str) -> str:
> match string:
>