Skip to main content

New answers tagged

2 votes
Accepted

Send a QNetworkRequest with a parameter

Do not use method 3. Lambdas are somewhat of a wart on the language. If you want to curry parameters, then use instead functools.partial. I consider this method ...
Reinderien's user avatar
  • 62.8k
6 votes

Capture multiple errors before raising an exception

Neither of your options is very well-suited to static type analysis. To improve that, consider instead something like ...
Reinderien's user avatar
  • 62.8k
3 votes

Capture multiple errors before raising an exception

Both techniques have their pros and cons, but there is a slightly (IMO) better way to achieve this using a dictionary to map environment variables to their corresponding variable names, as in your ...
Grajdeanu Alex's user avatar
5 votes

Capture multiple errors before raising an exception

The second technique, where you iterate over a sequence of name pairs, is much much better. There is nothing wrong with catching KeyError, but you may find it more ...
J_H's user avatar
  • 30.7k
5 votes

How to avoid null Values in a .NET 6+ ASP.NET project

You're asking a debatable question as all approaches are valid and commonly used. It's a matter of which approach that you see is more suitable to your current codebase. Your goal should be to ...
iSR5's user avatar
  • 5,478

Top 50 recent answers are included