3 ms·
I think it'll depend on the role. If you're coming into a role saying "I'm very familiar with Python" and you don't know one of the most famous 'gotchas', that
by insanitybit 4y ago
I think it'll depend on the role.
If you're coming into a role saying "I'm very familiar with Python" and you don't know one of the most famous 'gotchas', that says something.
If you're coming into a role and saying "Hey, I'm not so familiar with Python but I have experience in other languages and I'd love to learn it as part of this role" I think that question is not appropriate.
- goostavos 4y agoEven still.. Seems a bit... arbitrary? It's pretty easy to just never bump into certain corners of languages -- even if you use said language extensively. I've used Python for, like, 8(ish) years professionally. I maintain a few moderately popular open source libraries. I honestly don't recall exactly what happens when you do the `list_to_add=[]` thing, because these days I pretty much never pass in a list with the purpose of having it be mutated by something else. I know is that I did try it once, a long time ago, and that it does something unexpected. But I couldn't tell ya more than that just by looking at in. Color me dismayed to discover that I'm actually a hack fraud.
- anon291 4y ago> But I couldn't tell ya more than that just by looking at in. > > Color me dismayed to discover that I'm actually a hack fraud. What I said elsewhere still stands. Yes... this kind of thing is the difference between 'works well' and 'exposes private user data to other users'. I'm glad you don't use such constructs, but realistically, given python's closure rules and when data with interior mutability are captured, this situation arises more than just in this particular situation. And like I said... it can easily lead to exposing private information to other users.
- ghostwriter 4y agoThe question is appropriate because it allows for further elaboration, even if a candidate isn't familiar with the call by assignment semantics of Python. It enables for a follow up discussion about differences between calls by value, calls by references, immutability and so on.
- anon291 4y agoSure... junior engineers don't need to know everything. But if someone is putting themselves out there, by offering professional services for example, then yes they ought to know this sort of thing.