This is a follow-up to GH-100811.
One of the changes in that PR isn't accurate in that
`os.path.join('', '')` will not end in a separator.
This reverts that change to the previous wording that used "only", but
explicitly calls out the case where the last part ends in a separator,
which is what caused confusin in GH-77607 and motivated the change
in GH-100811.
(cherry picked from commit 909a674693)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
(cherry picked from commit 9a155138c5)
While the documentation for `optparse` mentioned that both `store_const` and
`append_const` store a constant value, it was not clear where this value was
coming from.
A link to `Option.const` makes this explicit.
Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
The zipfile.Path open() and read_text() encoding parameter can be supplied as a positional argument without causing a TypeError again. 3.10.0b1 included a regression that made it keyword only.
Documentation update included as users writing code to be compatible with a wide range of versions will need to consider this for some time..
(cherry picked from commit 5927013e47)
Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
Sync-up parameter name in equivalent code snippet of `enumerate` (GH-101029)
(cherry picked from commit ef633e5000)
Co-authored-by: JustAnotherArchivist <JustAnotherArchivist@users.noreply.github.com>
- Use "drive", not "drive letter", because of UNC paths
- Previous components are not thrown away from relative drive letters
- Use "segment" instead of "component" for consistency with pathlib
- Other miscellaneous improvements
(cherry picked from commit 53455a319f)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Removed erroneous note in the get_type_hints docs
typing.get_type_hints still includes base class type hints.
(cherry picked from commit deaf090699)
Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
update dataclasses docs for when annotations are inspected
(cherry picked from commit 659c2607f5)
Co-authored-by: Akshit Tyagi <37214399+exitflynn@users.noreply.github.com>
The behaviour is fully explained a couple paragraphs above, but it may be useful to have a brief example to cover the behaviour.
(cherry picked from commit 1ae619c911)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Automerge-Triggered-By: GH:hauntsaninja
- Remove first link to lexical definition of integer literal, since it
doesn't apply (differs in handling of leading zeros, base needs to be
explicitly specified, unicode digits are allowed)
- Better describe handling of leading zeros, unicode digits, underscores
- Base 0 does not work exactly as like a code literal, since it allows
Unicode digits. Link code literal to lexical definition of integer
literal.
(cherry picked from commit edfbf56f4c)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
The PEP-249 numeric style has never been supported by sqlite3.
(cherry picked from commit b7a68ab824)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
All the arguments are positional-only.
The current status after GH-99476 seems to be to not use positional-only
markers in documentation, hence I've simply removed it.
(cherry picked from commit 71159a8e07)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Based on the definition of the collections.abc classes, it is more accurate to use "sequence" instead of "container" when describing argparse choices.
(cherry picked from commit ad3c99e521)
Co-authored-by: Guy Yagev <yourlefthandman8@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>