https://docs.python.org/3/library/asyncio-task.html#shielding-from-cancella…
In this endpoint there is a typo
Namely,
The statement:
task = asyncio.create_task(something())
res = await shield(task)
is equivalent to:
res = await something()
should be
The statement:
task = asyncio.create_task(something())
res = await shield(task)
is equivalent to:
res = await shield(something())
Respectfully,
Dyussenov Nuraly
Hello,
I found a very small typo in the documentation for the socket module for
python 3.11.5,
https://docs.python.org/3/library/socket.html#socket-objects. Near the
bottom of the page is a sentence that reads, "The client side will try
to connect to the all addresses returned as a result of the name
resolution, and sends traffic to the first one connected successfully.".
I think instead of "...the all addresses..." it should read "...all the
addresses..."
I will fill out a bug report if that is better than sending an email,
just let me know.
All best,
--
Hank Knox, FRSC
Schulich School of Music of
McGill University (retired)
Montreal, QC
Dear Python Support,
Im home user of the Python package library.
I been using latest python version available in website: python.org.
Please review the Pip tool, that is supposed to download all the package library of Python. There is no full documentation available of this binary. There are links about it to whatever is available of this command in GitHub. The are no email about developers in GitHub to give feedback. MinGWb(and CygWin), another app for windows of Unix's environment, have no information.
More details:
There is no installation of pygame. Pip tool shows problems with Python's scripts.
There is no contact details about the developers in Python.org website.
Pip binary looks to be the Python tool to install software, there is no information about running a test to verify connection to verified Python Servers.
Pip tool maybe be corrupted. Python Professional developers should put an eye on this issue.
Provide locations of where is developing this packages.
Best Regards,
Eng. Peláez Uriel.
Location: Mexico City.
September 2023
Dear Mdam-Sir.
I want to learn about Pyton I see in your information that a book is in Spanish.
But not all text are in Spanish language. I understood very well but better the explanation in Spanish.
See you hier. https://docs.python.org/es/3/tutorial/introduction.html
Además de int<https://docs.python.org/es/3/library/functions.html#int> y float<https://docs.python.org/es/3/library/functions.html#float>, Python admite otros tipos de números, como Decimal<https://docs.python.org/es/3/library/decimal.html#decimal.Decimal> y Fraction<https://docs.python.org/es/3/library/fractions.html#fractions.Fraction>. Python también tiene soporte incorporado para complex numbers<https://docs.python.org/es/3/library/stdtypes.html#typesnumeric>, y usa el sufijo j o J para indicar la parte imaginaria (por ejemplo, 3+5j).
3.1.2. Text
Python can manipulate text (represented by type str<https://docs.python.org/es/3/library/stdtypes.html#str>, so-called «strings») as well as numbers. This includes characters «!», words «rabbit», names «Paris», sentences «Got your back.», etc. «Yay! :)». They can be enclosed in single quotes ('...') or double quotes ("...") with the same result 2<https://docs.python.org/es/3/tutorial/introduction.html#id4>.
>>>
>>> 'spam eggs' # single quotes
'spam eggs'
>>> "Paris rabbit got your back :)! Yay!" # double quotes
'Paris rabbit got your back :)! Yay!'
>>> '1975' # digits and numerals enclosed in quotes are also strings
'1975'
To quote a quote, we need to «escape» it, by preceding it with \. Alternatively, we can use the other type of quotation marks:
>>>
>>> 'doesn\'t' # use \' to escape the single quote...
"doesn't"
>>> "doesn't" # ...or use double quotes instead
"doesn't"
>>> '"Yes," they said.'
'"Yes," they said.'
>>> "\"Yes,\" they said."
'"Yes," they said.'
>>> '"Isn\'t," they said.'
'"Isn\'t," they said.'
In the Python shell, the string definition and output string can look different. The print()<https://docs.python.org/es/3/library/functions.html#print> function produces a more readable output, by omitting the enclosing quotes and by printing escaped and special characters:
>>>
>>> s = 'First line.\nSecond line.' # \n means newline
>>> s # without print(), special characters are included in the string
'First line.\nSecond line.'
>>> print(s) # with print(), special characters are interpreted, so \n produces new line
First line.
Second line.
Si no quieres que los caracteres precedidos por \ se interpreten como caracteres especiales, puedes usar cadenas sin formato agregando una r antes de la primera comilla:
>>>
>>> print('C:\some\name') # here \n means newline!
C:\some
ame
>>> print(r'C:\some\name') # note the r before the quote
C:\some\name
There is one subtle aspect to raw strings: a raw string may not end in an odd number of \ characters; see the FAQ entry<https://docs.python.org/es/3/faq/programming.html#faq-programming-raw-strin…> for more information and workarounds.
Las cadenas de texto literales pueden contener múltiples líneas. Una forma es usar triples comillas: """...""" o '''...'''. Los fin de línea son incluidos automáticamente, pero es posible prevenir esto agregando una \ al final de la línea. Por ejemplo:
Verzonden vanuit Mail<https://go.microsoft.com/fwlink/?LinkId=550986> voor Windows
Sorry, but your Python docs are shot through with inaccurate staements as
far as I can tell.
For example, on this page
https://docs.python.org/3/library/functions.html
arguments for some functions (endswith, for example) are described as
"substring" and "character," when they actually just take strings (or
tuples of strings). When your description says that I need to use a
"character" where I where I remember using a string in the past, I have to
go check documentation on other sites to see if it's accurate. If I have
to double-check your docs, what good are they? I'll just use a different
site that is more reliable.
python.org's docs should be bullet-proof and authoritative, not
loosey-goosey.
Sincerely,
Dan Lokemoen