wasabi

joined 2 years ago
[–] [email protected] 1 points 1 year ago

Damn I hoped it was this clown orban

[–] [email protected] 3 points 1 year ago (2 children)

Lmao, chinese tea ceremony includes like 500 steps.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Honestly the most complete source of high res music is private trackers like redacted. You can download all the stuff from qobuz and bandcamp, every CD rip you can think of in bit perfect quality of and even very good vinyl rips. You basically can download any version ever released from any album.

[–] [email protected] 1 points 1 year ago

Yes, that's a good alternative for Collection[str] but not so much for Iterable[str] as you lose the lazyness of Generators.

[–] [email protected] 3 points 1 year ago

Maybe something like passing in a list of patterns which should match some data, or a list of files/urls to download would be examples of where I would like to be generic, but taking in a string would be bad.

But the real solution be to convert it to foo(*args: str). But maybe if you take 2 Container[str] as input so you can't use *args. But no real world example comes to mind.

[–] [email protected] 1 points 1 year ago

Yes, you're right. It also a lot of benefits.

[–] [email protected] 2 points 1 year ago (2 children)

This + an assert seems like the way to go. I think that str should never have fulfilled these contracts in the first place and should have a .chars property that returns a list of one-character-strings. But this change would break existing code, so it is not going to happen.

[–] [email protected] 2 points 1 year ago

str matches most of these contracts, though, requiring additional checks if a str was passed or one of these collections containing strings.

[–] [email protected] 3 points 1 year ago (3 children)

But what if you actually don't want str to be valid?

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

I know that Iterable and Collection aren't the same. My point is, that if you use Iterable[str] or Collection[str] as a more flexible alternative to list[str] you no longer have any type-hinting support protecting against passing in a plain string and you could end up with a subtle bug by unexpectedly looping over ['f', 'o', 'o'] instead of ['foo'].

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

For now. YouTube constantly changes stuff, requiring changes to newpipe. As no one will merge these into the fork, it will stop working when that happens.

view more: ‹ prev next ›