3 ms·
Importing * is universally discouraged by most Python linters and best practice docs. You can always "import helium as h" if you're looking to type less. This
by languagehacker 2y ago
Importing * is universally discouraged by most Python linters and best practice docs. You can always "import helium as h" if you're looking to type less.
This looks largely like common workarounds that most people will write using Python-based browser automation. Most of the time, we accept that those capabilities aren't there by default because they are not explicit enough and can result in bugs and undefined behavior even when the elements that we expect to be on the page are actually there.
Given the adage "explicit is better than implicit", I worry that a layer like this might create more trouble than it's worth for the sake of readability. When we get into the nitty-gritty of browser automation, it might just make it harder to debug than going straight to Selenium or Playwright.
- mherrmann 2y agoImporting * is universally discouraged by most Python linters and best practice docs. Yup, I would never do it in a .py file. But I do it all of the time in the interpreter, which is what the video shows. This looks largely like common workarounds that most people will write using Python-based browser automation. Most of the time, we accept that those capabilities aren't there by default because they are not explicit enough and can result in bugs and undefined behavior even when the elements that we expect to be on the page are actually there. It sounds like you haven't tried Helium yet. I think you should, and see for yourself whether the trade-off you talk about actually exists. Given the adage "explicit is better than implicit", I worry that a layer like this might create more trouble than it's worth for the sake of readability. You could make the same argument about using C / assembly instead of Python. I suggest you try Helium before making statements about the "trouble" it may create. I believe you will find that there is no trouble.
- shepherdjerred 2y agoIt would be much more useful if you tried out the tool before criticizing it Or, if you have tried it, if you could explain why you don’t think the tool makes the right tradeoffs Adages like “explicit is better than implicit” are incredibly context dependent, otherwise we’d all be writing assembly
- i_love_retros 2y ago[dead]