@grumpy_developer isn't it just a site where you store your résumé? Why read it? :-)

@yogthos спасибо, посмотрю на досуге!

@yogthos тем не менее, идея о том, что этот тонкий телефончик будет давать доступ к любой информации, показывать реальное местонахождение и позволять делать групповые видеозвонки не приходила в голову даже самым смелым мечтателям. (Но консумеризм ужасен, это правда.)

@sophia hm... That sounds misleading. Of course you want to treat people differently. I can spontaneously bear-hug most of my male friends, but towards unsuspecting women that'd be disrespectful. In other words, using the same level of respect doesn't mean treating them in exactly the same way.

I have developed an unhealthy disdain for phones with screens curling around the edges. What a dysfunctional idea!

food Show more

food photo Show more

@art_codesmith as a former contributor, I can confirm it. The original point of the ORM was to provide an abstraction over constructing SQL statements in different dialects. Turning table rows into object was an obvious convenience, but it never tried to be an actual ORM which abstracts the entire notion of storage for objects.

@voldmar есть, есть! Хотя, наверное, менее напряжённая, чем в Твиттере :-)

@Xyc0 because it's more clutter and more maintenance, generally.

@Xyc0 it's what join is. I'm not talking about how to solve the problem (you can just do path[1:]), my point is that you can describe this constraint in a docstring, but can't express it with types.

@Xyc0 this is from the actual code I'm working on right now: the function has to treat the path it gets ("/dir") to be contained under a mount point ("/mnt/drive"), so the full path is going to be "/mnt/drive/dir". Mentioning of the leading slash is important because you can't just `join` them:

Path("/mnt/drive") / "/dir"

will give you "/dir".

But my point is that the question "what kind of value the function expects" is way more complicated than just "what type it is".

@Xyc0 for that we have docstrings :-). And there you can express any notion, not just "it's a string", but also things like "a path relative to a mount point, always starting with a /". Try and express that with type hints :-)

@Xyc0 don't constrain the argument type to `str`, it'll work for `Path`s just as well.

(This is a good example of why I don't like this new trend of bringing types into Python, but that's a whole different story.)

Obscure bit of knowledge: os.scandir() accepts not only strings, but also its own dir entries, so you can do:

for entry in os.scandir('.'):
if entry.is_dir():
os.scandir(entry) # not entry.path

It just saved me from thinking about how to split up a long line :-)

If Mastodon were really crumbling, nobody would be writing articles about it.

@nein09 sounds painful! And yes, I thought it'd be JavaScript :-) My second guess was C++ for some reason.

@Are0h @denikombucha I'm not the one here who looks like his feelings are hurt, dude.

Show more
Mastodon

Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!