News for hackers. Stuff that matters.
Re:Icecream: Never use print() to debug again in Python by atoav on Tuesday March 30, 2021 @02:54AM (#26631823)
I am sorry, but I am not going to pull in an external dependency just for this, especially not with the power of fstrings in newer python versions.
Re:Icecream: Never use print() to debug again in Python by tamentis on Tuesday March 30, 2021 @03:24AM (#26632000)
You're just being difficult. It's easy, you just setup these 10 Node.js micro services in docker, setup your database, the cache. Then my friend, you can really debug with beautiful print messages.

Wait until someone creates a $10/user SaaS service out of it.

Re:Icecream: Never use print() to debug again in Python by fouc on Tuesday March 30, 2021 @04:41AM (#26632364)
Insightful prediction of how development will be done in the future.
Re:Icecream: Never use print() to debug again in Python by dataflow on Tuesday March 30, 2021 @03:20AM (#26631979)
It's for debugging. Not something to depend on in released code. Put the import in your site initialization file and you won't even have to import it in the REPL.
Re:Icecream: Never use print() to debug again in Python by atoav on Tuesday March 30, 2021 @02:46PM (#26638632)
I understand, but Python >3.8 can do this:

  >>> x = 1+1
  >>> print(f"{x = }")
  x = 2
And if it is included why pulling in a dependency? And even if it is a dev dependency: it can be a dev dependency that bites you in two years in the middle of a night when your service fails.
Re:Icecream: Never use print() to debug again in Python by mnd999 on Tuesday March 30, 2021 @03:19AM (#26631976)
Indeed, in a couple of years this is the new leftpad.
Re:Icecream: Never use print() to debug again in Python by mcswell on Tuesday March 30, 2021 @11:37PM (#26643253)
And I am going to use it, because of the pain of typing {, which half the time my fingers miss (whereas I'm pretty good at typing 'i' and 'c').