[Python-ideas] Re: Native support for units [was: custom literals]

2022-04-09 Thread Stephen J. Turnbull
Steven D'Aprano writes: > There are many things which are core to science and engineering but > aren't part of the core Python language. What makes units of > measurements more special than, say, numpy arrays or dataframes? Arrays and dataframes are data structures, hidden behind the

[Python-ideas] Re: Native support for units [was: custom literals]

2022-04-09 Thread Christopher Barker
wrote: > This message is for those that would like to "play" with a more natural > looking syntax for units in Python. > This is very cool -- thanks! -CHB -- Christopher Barker, PhD (Chris) Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web

[Python-ideas] Re: Native support for units [was: custom literals]

2022-04-09 Thread André Roberge
Greetings, This message is for those that would like to "play" with a more natural looking syntax for units in Python. First, a quick look: > python -m ideas -t easy_units Ideas Console version 0.0.23. [Python version: 3.10.2] ~>> import pint ~>> U = pint.UnitRegistry() ~>> walk = 3[km] +

[Python-ideas] Re: Native support for units [was: custom literals]

2022-04-09 Thread Christopher Barker
On Sat, Apr 9, 2022 at 5:52 AM Steven D'Aprano wrote: > > Python is so painful to use for units I've actually avoided it, What have you tried? and what do you do instead? MathCAD, maybe? For my part, there is a bit of a barrier to entry: I need to pick a library, I need to get over the

[Python-ideas] Re: Native support for units [was: custom literals]

2022-04-09 Thread Steven D'Aprano
On Thu, Apr 07, 2022 at 11:18:57PM -, Brian McCall wrote: > > What does it *really* matter which of these you write? > > > that's just arguing over the colour of the bikeshed. > > > you have shown nothing to justify why unit support must be built > > into the language itself. > > I did

[Python-ideas] Re: mro and super don't feel so pythonic

2022-04-09 Thread David Mertz, Ph.D.
On Sat, Apr 9, 2022, 7:31 AM malmiteria wrote: > Joao S. O. Bueno writes: > > You are still repeating this: > > "more in line with the expectation of the majority, " > > Though, as already asked, there is zero (nothing) to support that. > Here's some more evidence of a sort: I've taught

[Python-ideas] Re: Native support for units [was: custom literals]

2022-04-09 Thread Steven D'Aprano
On Fri, Apr 08, 2022 at 07:20:35AM -0400, Ricky Teachey wrote: > Python is so painful to use for units I've actually avoided it, so there > won't be many examples I can give anyway. Hence my silence in this thread > the past few days. Which of the many Python libraries have you tried, and what

[Python-ideas] Re: mro and super don't feel so pythonic

2022-04-09 Thread malmiteria
Greg ewing writes: > That sounds like exactly what Class.method(self) does today. Why > do we need another way to do it? Because that's a completely different syntax from the commonly used super, it's likely enough that some people wouldn't think of it to be a problem. Again, if you disagree

[Python-ideas] Re: mro and super don't feel so pythonic

2022-04-09 Thread malmiteria
Joao S. O. Bueno writes: > You are still repeating this: > "more in line with the expectation of the majority, " > Though, as already asked, there is zero (nothing) to support that. I'm also still repeating: People most common experience with super informs their understanding and expectations