An IDE with support for PEP 484 / mypy / type annotations (and/or writing
tests) can help minimize typing-related errors.
https://github.com/python/typeshed/blob/master/stdlib/3/json/__init__.pyi
https://github.com/python/mypy/blob/master/README.md#ide-linter-integrations-and-pre-commit
On Wedne
Side q: Is there yet a way to get ? and/or ?? In IPython/Jupyter to list
{typeshed,} annotations?
On Thursday, November 28, 2019, Wes Turner wrote:
> An IDE with support for PEP 484 / mypy / type annotations (and/or writing
tests) can help minimize typing-related errors.
>
> https://github.com/py
IDK that a DeprecationWarning would be helpful or necessary?
https://github.com/python/cpython/blob/02519f75d15b063914a11351da30178ca4ceb54b/Lib/calendar.py#L625
:
```python
monthcalendar = c.monthdayscalendar
prweek = c.prweek
week = c.formatweek
weekheader = c.formatweekheader
prmonth = c.prmon
It's about ambiguity. Maybe loads is short for load string which in english
is also a verb.
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
On Thu, 28 Nov 2019, 12:38 Wes Turner, wrote:
> An IDE with support for PEP 484 / mypy / type annotati
On Thu, Nov 28, 2019 at 02:06:08PM +0400, Abdur-Rahmaan Janhangeer wrote:
> It's about ambiguity. Maybe loads is short for load string which in english
> is also a verb.
True. It took me a long time to stop getting confused between
pickle.load and .loads until I stopped reading it as "loads" and
For the future, at least
I happen to be teaching essential std lib modules this week, i had a
headache with how naming goes on (i was looking at how a beginner would
learn). Poor me, what could be an intuitive learning journey has some
clogs down the road.
Abdur-Rahmaan Janhangeer
http://www.py
> I happen to be teaching essential std lib modules this week, i had a
headache with how naming goes on (i was looking at how a beginner would
learn). Poor me, what could be an intuitive learning journey has some
clogs down the road.
To some degree, that's an inevitable part of the learning proc
"Designed With Learning in Mind"
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
___
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
h
Maybe methods for learning to search the code and docs (rather than
memorizing APIs) would be a worthwhile exercise?
# Python
import json
help(json)
# IPython
!pydoc json
import json
json?
json??
# RTD: Read The Docs (and/or update the docs)
https://docs.python.org/3/search.html?q=loads
https:
I'd be +1 on adding a better named alias for loading strings to all of
these libraries.
Seems to me like it is a pretty awful naming convention even if it is
standard across the profession, and that adding load_string or load_str as
an alias for loads would be a Very Good Thing (TM) with few downs
Abdur-Rahmaan Janhangeer writes:
> "Designed With Learning in Mind"
That's Python. Guido said so from the beginning, and in modern Python
development we tend to favor full words with a consistent convention
for separating them in multiword identifiers and so on. Syntax
additions get fully bike
On Nov 28, 2019, at 06:31, Ricky Teachey wrote:
>
> I'd be +1 on adding a better named alias for loading strings to all of these
> libraries.
Including the ones that aren’t in the stdlib? If so, how do we do that?
If not, won’t it be even more confusing for people who learn json.load_string
On Fri, Nov 29, 2019 at 12:55:13AM +0900, Stephen J. Turnbull wrote:
> Abdur-Rahmaan Janhangeer writes:
>
> > "Designed With Learning in Mind"
>
> That's Python. Guido said so from the beginning,
Is it? Did he? Do you have references for that?
https://duckduckgo.com/?q=python+%22Designed+With
On Fri, Nov 29, 2019 at 7:59 AM Steven D'Aprano wrote:
> Off-topic:
>
> I'm consistently and frequently frustrated by the community's use of PEP
> id numbers as jargon. I consider it to be a classic example of the use
> of jargon to exclude, rather than the sense of using it to streamline
> commun
On 2019-11-28 20:51, Steven D'Aprano wrote:
[snip]
I'm consistently and frequently frustrated by the community's use of PEP
id numbers as jargon. I consider it to be a classic example of the use
of jargon to exclude, rather than the sense of using it to streamline
communication.
[snip]
Apart
>
> > I'd be +1 on adding a better named alias for loading strings to all of
> these libraries.
>
> Including the ones that aren’t in the stdlib? If so, how do we do that?
>
Leading by example of not sticking forever with obfuscated naming.
So the Very Good Thing isn’t actually as good... you ne
The math.copysign(x, y) function always returns a float, even when the
given x is an int, i.e. math.copysign(3, -1) gives -3.0. This is documented
behaviour, but I find it somewhat surprising given that the name suggests
that it only copies a sign, and it's also annoying in situations when an
int i
Ricky Teachey writes:
> Leading by example of not sticking forever with obfuscated naming.
We do push back against obfuscated naming, including abbreviations
like loads, but forward-looking, not backward-looking. There's also
the problem in the stdlib that often a requirement for a module to be
Steven D'Aprano writes:
> On Fri, Nov 29, 2019 at 12:55:13AM +0900, Stephen J. Turnbull wrote:
> > Abdur-Rahmaan Janhangeer writes:
> >
> > > "Designed With Learning in Mind"
> >
> > That's Python. Guido said so from the beginning,
>
> Is it? Did he? Do you have references for that?
Y
Education is one side of it. It's about intuitive API
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
___
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to python-ide
In Python 2, returning an int where a float was expected could break
existing code (since in Python 2 int and float behave differently under
division), but in Python 3 int is virtually a subclass of float (see PEP
3141). So it's not a crazy idea.
However, it's a bit of a slippery slope. Pretty muc
>
>
> And PEP numbers have a fourth purpose when used as jargon (this
> applies to any numbered formal standard such as RFCs or ISO): they are
> self-citing. In that sense, they are *inclusive*. They're an
> invitation to learn more than you ever wanted to know about the things
> the community ca
22 matches
Mail list logo