Serhiy Storchaka
997a4adea6
Remove outdated note about constraining of the bit shift right operand. ( #1258 )
...
The constrain was removed in bpo-29816.
2017-04-22 21:50:09 +03:00
cocoatomo
cdcac039fb
bpo-29952: Use usual terminology of dict (GH-917)
...
s/keys and elements/keys and values/
2017-03-31 14:48:49 +09:00
Amit Kumar
0ae7c8bd61
bpo-16011 clarify that 'in' always returns a boolean value
2017-03-28 10:13:01 -04:00
Ivan Levkivskyi
fad7f15606
Remove an outdated statement in execution model docs (GH-754)
2017-03-22 17:54:53 -07:00
Mariatta
d4e89287b3
bpo-28739: Document that f-strings cannot be used as docstring (GH-592)
2017-03-10 08:58:40 -08:00
Mariatta
1f5639c77f
bpo-26184: import.rst: Improve versionchanged note (GH-325)
2017-02-26 13:23:38 -08:00
Mariatta
6b4a5f45e2
bpo-26184: import.rst: Improve versionchanged note (GH-277)
...
Mention that an ImportError is raised when exec_module() is defined, but
create_module() is not.
2017-02-26 07:36:57 -08:00
Marco Buttu
46ce7599af
bpo-29648: import.rst: Add reference to create_module() (GH-290)
...
Add a reference to create_module(), in the first versionadded of section Loaders.
2017-02-26 07:14:45 -08:00
Jim Fasarakis-Hilliard
132ac381fe
Fix small typos in expressions.rst (GH-276)
2017-02-24 12:32:54 -08:00
Martin Panter
2be9889405
Issues #12067 : Merge hash recommendation from 3.5
2017-01-29 10:07:26 +00:00
Martin Panter
8dbb0ca573
Issue #12067 : Recommend that hash and equality be consistent
2017-01-29 10:00:23 +00:00
Berker Peksag
406c252970
Issue #29012 : Merge from 3.5
2017-01-03 03:35:49 +03:00
Berker Peksag
7b4e551091
Issue #29012 : Remove another outdated information
...
Patch by Jim Fasarakis-Hilliard.
2017-01-03 03:34:15 +03:00
Berker Peksag
a22457ecaf
Issue #29012 : Merge from 3.5
2017-01-02 06:01:07 +03:00
Berker Peksag
14adafd6ee
Issue #29012 : Remove outdated information about __bases__
...
Patch by Jim Fasarakis-Hilliard.
2017-01-02 06:00:35 +03:00
Martin Panter
7e930d7677
Issue #28954 : Merge keyword argument syntax from 3.5
2016-12-24 10:21:30 +00:00
Martin Panter
7106a51c71
Issue #28954 : Add missing comma to keyword argument syntax
2016-12-24 10:20:38 +00:00
Victor Stinner
01e4c1175f
Merge 3.5
2016-12-19 13:09:55 +01:00
Victor Stinner
509476b370
doc: Suggest to hash(tuple of attr) rather than XOR
...
Issue #28383 : __hash__ documentation recommends naive XOR to combine but this
is suboptimal. Update the doc to suggest to reuse the hash() method using a
tuple, with an example.
2016-12-19 13:09:28 +01:00
Yury Selivanov
03660041d2
Issue #28091 : Document PEP 525 & PEP 530.
...
Patch by Eric Appelt.
2016-12-15 17:36:05 -05:00
Nick Coghlan
19d246745d
Issue #23722 : improve __classcell__ compatibility
...
Handling zero-argument super() in __init_subclass__ and
__set_name__ involved moving __class__ initialisation to
type.__new__. This requires cooperation from custom
metaclasses to ensure that the new __classcell__ entry
is passed along appropriately.
The initial implementation of that change resulted in abruptly
broken zero-argument super() support in metaclasses that didn't
adhere to the new requirements (such as Django's metaclass for
Model definitions).
The updated approach adopted here instead emits a deprecation
warning for those cases, and makes them work the same way they
did in Python 3.5.
This patch also improves the related class machinery documentation
to cover these details and to include more reader-friendly
cross-references and index entries.
2016-12-05 16:47:55 +10:00
Martin Panter
28540183c9
Another en → em dash fix for 3.6
2016-11-21 04:10:45 +00:00
Jason R. Coombs
f66f03bd35
Update docs to reflect new behavior around backslashes in expressions (not allowed), matching recent changes to PEP 498.
2016-11-06 11:27:17 -05:00
Serhiy Storchaka
989db5c880
Issue #19795 : Mark up None as literal text.
2016-10-19 16:37:13 +03:00
Serhiy Storchaka
ecf41da83e
Issue #19795 : Mark up None as literal text.
2016-10-19 16:29:26 +03:00
Raymond Hettinger
0b51fd4341
merge
2016-09-11 17:24:05 -07:00
Raymond Hettinger
06e18a7c24
Issue #26511 : Reference the id() function in the 'is' and 'is not' docs
2016-09-11 17:23:49 -07:00
Guido van Rossum
015d874626
Issue #28076 : Variable annotations should be mangled for private names.
...
By Ivan Levkivskyi.
2016-09-11 09:45:24 -07:00
Brett Cannon
a721abac29
Issue #26331 : Implement the parsing part of PEP 515.
...
Thanks to Georg Brandl for the patch.
2016-09-09 14:57:09 -07:00
Eric Snow
68f4dd8b01
Doc updates for PEPs 520 and 468.
2016-09-09 11:22:14 -07:00
Guido van Rossum
6cff8744a0
Issue #27999 : Make "global after use" a SyntaxError, and ditto for nonlocal.
...
Patch by Ivan Levkivskyi.
2016-09-09 09:36:26 -07:00
Yury Selivanov
f8cb8a16a3
Issue #27985 : Implement PEP 526 -- Syntax for Variable Annotations.
...
Patch by Ivan Levkivskyi.
2016-09-08 20:50:03 -07:00
Eric Snow
4f29e75289
Issue #24254 : Drop cls.__definition_order__.
2016-09-08 15:11:11 -07:00
Eric Snow
b957b0c2bc
Issue #28030 : Update the language reference for PEP 468.
2016-09-08 13:59:58 -07:00
R David Murray
110b6fecbb
#27364 : Deprecate invalid escape strings in str/byutes.
...
Patch by Emanuel Barry, reviewed by Serhiy Storchaka and Martin Panter.
2016-09-08 15:34:08 -04:00
Eric Snow
46f97b85a8
Issue #15767 : Use ModuleNotFoundError.
2016-09-07 16:56:15 -07:00
Eric Snow
92a6c170e6
Issue #24254 : Preserve class attribute definition order.
2016-09-05 14:50:11 -07:00
Raymond Hettinger
f74c33ad5c
Merge
2016-08-25 21:12:16 -07:00
Raymond Hettinger
7ea386e56e
Issue 19504: Change "customise" to "customize" American spelling.
2016-08-25 21:11:50 -07:00
Guido van Rossum
97c1adf393
Anti-registration of various ABC methods.
...
- Issue #25958 : Support "anti-registration" of special methods from
various ABCs, like __hash__, __iter__ or __len__. All these (and
several more) can be set to None in an implementation class and the
behavior will be as if the method is not defined at all.
(Previously, this mechanism existed only for __hash__, to make
mutable classes unhashable.) Code contributed by Andrew Barnert and
Ivan Levkivskyi.
2016-08-18 09:22:23 -07:00
Brett Cannon
3f63483a30
Merge for issue #27712
2016-08-12 10:57:17 -07:00
Brett Cannon
6336fb2734
Issue #27712 : Fix some typos in the import docs.
...
Thanks to Xiang Zhang for the patch.
2016-08-12 10:56:48 -07:00
Berker Peksag
91494d3b73
Issue #26576 : Merge from 3.5
2016-08-03 10:17:51 +03:00
Berker Peksag
6cafececbf
Issue #26576 : Clarify that the @deco syntax is not always an equivalent of f = deco(f)
...
Patch by Chris Angelico.
2016-08-03 10:17:21 +03:00
Nick Coghlan
607e1c4c44
Issue 27366: PEP 487 docs updates
...
- Porting note for type keyword arg handling
- __init_subclass__ note regarding metaclass hint
2016-07-31 12:42:49 +10:00
Berker Peksag
01d1719062
Issue #27366 : Tweak PEP 487 documentation
...
* Added versionadded directives
* Deleted duplicate sentence from __init_subclass__ docstring
* Modernized tests
2016-07-30 14:06:15 +03:00
Nick Coghlan
d78448e912
Issue #27366 : Implement PEP 487
...
- __init_subclass__ called when new subclasses defined
- __set_name__ called when descriptors are part of a
class definition
2016-07-30 16:26:03 +10:00
Martin Panter
6a09315ff0
Issue #26462 : Merge code block fixes from 3.5
2016-07-29 01:49:37 +00:00
Martin Panter
1050d2d0c7
Issue #26462 : Doc: reduce literal_block warnings, fix syntax highlighting.
...
Patch by Julien Palard.
2016-07-26 11:18:21 +02:00
Martin Panter
2fec611a70
Issue #24314 : Merge doc links from 3.5
2016-06-18 08:20:22 +00:00
Martin Panter
bae5d81f5d
Issue #24314 : Fix doc links for general attributes like __name__, __dict__
2016-06-18 03:57:31 +00:00
Martin Panter
ed74e243c6
Issue #24136 : Adjust f-strings doc for interable unpacking
2016-06-12 01:56:24 +00:00
Martin Panter
99cb0cda15
Issue #24136 : Merge unpacking doc from 3.5
2016-06-12 01:55:03 +00:00
Martin Panter
0c0da48aed
Issue #24136 : Document generalized unpacking, PEP 448
...
Based on patches by Konstantin Molchanov and Neil Girdhar.
2016-06-12 01:46:50 +00:00
Martin Panter
5848ac2df0
Issue #15476 : Merge index entries from 3.5
2016-06-09 23:36:40 +00:00
Yury Selivanov
711d25db48
Merge 3.5 (issue #27243 )
2016-06-09 15:13:16 -04:00
Yury Selivanov
a6f6edbda8
Issue #27243 : Fix __aiter__ protocol
2016-06-09 15:08:31 -04:00
Martin Panter
7d7a11b5d7
Issue #23275 : Backport target list assignment documentation fixes
2016-06-08 12:44:30 +00:00
R David Murray
3bad04ca62
Merge: #26829 : Clarify that namespace is copied to a new __dict__ in instance creation.
2016-06-02 20:06:13 -04:00
R David Murray
dd4fcf52f4
#26829 : Clarify that namespace is copied to a new __dict__ in instance creation.
...
Patch by Emily Morehouse.
2016-06-02 20:05:43 -04:00
Tommy Beadle
e9b8403a1f
[Issue 15476] Make "code object" its own entry in the index
2016-06-02 19:26:51 -04:00
Berker Peksag
094c9c921c
Issue #23275 : Allow () = iterable assignment syntax
...
Documentation updates by Martin Panter.
2016-05-18 08:44:29 +03:00
Ned Deily
36c18956b0
Issue #27049 : fix doc typo
2016-05-17 21:45:13 -04:00
Ned Deily
cec95813b2
Issue #27049 : fix doc typo
2016-05-17 21:44:46 -04:00
Benjamin Peterson
815b61d4ce
merge 3.5 ( #27042 )
2016-05-16 23:20:32 -07:00
Benjamin Peterson
54044d605f
class definitions only get argument lists ( closes #27042 )
2016-05-16 23:20:22 -07:00
Benjamin Peterson
bc7ee43a6d
Backed out changeset 71ff2235bb4c ( closes #27042 )
2016-05-16 23:18:33 -07:00
Serhiy Storchaka
c499f30286
Issue #23921 : Standardized documentation whitespace formatting.
...
Original patch by James Edwards.
2016-05-10 12:01:56 +03:00
Serhiy Storchaka
dba903993a
Issue #23921 : Standardized documentation whitespace formatting.
...
Original patch by James Edwards.
2016-05-10 12:01:23 +03:00
Serhiy Storchaka
a26e4b97d8
Issue #26156 : Make expressions grammar description more semantically correct.
2016-05-08 22:00:09 +03:00
Serhiy Storchaka
c7cc9850d4
Issue #26156 : Make expressions grammar description more semantically correct.
2016-05-08 21:59:46 +03:00
Martin Panter
1ce738e08f
Merge typo fixes from 3.5
2016-05-08 14:02:35 +00:00
Martin Panter
f0564164ba
Fix typos in comments, documentation and test method names
2016-05-08 13:48:10 +00:00
Serhiy Storchaka
1acbf853c8
Issue #26736 : Used HTTPS for external links in the documentation if possible.
2016-05-07 10:49:58 +03:00
Serhiy Storchaka
6dff0205b7
Issue #26736 : Used HTTPS for external links in the documentation if possible.
2016-05-07 10:49:07 +03:00
Berker Peksag
c61d80cc83
Issue #18572 : Remove redundant note about surrogates in string escape doc
2016-04-24 03:14:01 +03:00
Berker Peksag
4f35d79d65
Issue #18572 : Remove redundant note about surrogates in string escape doc
2016-04-24 03:13:40 +03:00
Serhiy Storchaka
7b1e5a7722
Remove redundant leading zeroes in PEP references.
2016-03-31 15:31:20 +03:00
Serhiy Storchaka
e4ba872543
Remove redundant leading zeroes in PEP references.
2016-03-31 15:30:54 +03:00
Yury Selivanov
3e48b38dff
Merge 3.5 (issue #25887 )
2016-02-13 18:00:31 -05:00
Yury Selivanov
77c96813ab
Issue #25887 : Raise a RuntimeError when a coroutine is awaited more than once.
2016-02-13 17:59:05 -05:00
Martin Panter
bc1ee460dc
Issue #25179 : Documentation for formatted string literals aka f-strings
...
Some of the inspiration and wording is taken from the text of PEP 498 by Eric
V. Smith, and the existing str.format() documentation.
2016-02-13 00:41:37 +00:00
Zachary Ware
e922289620
Merge with 3.5
2016-02-03 22:07:08 -06:00
Zachary Ware
2b818142d1
Python for .NET has moved to Github.
...
Reported by Denis Akhiyarov on docs@
2016-02-03 22:05:46 -06:00
Brett Cannon
849113af6b
Issue #25791 : Warn when __package__ != __spec__.parent.
...
In a previous change, __spec__.parent was prioritized over
__package__. That is a backwards-compatibility break, but we do
eventually want __spec__ to be the ground truth for module details. So
this change reverts the change in semantics and instead raises an
ImportWarning when __package__ != __spec__.parent to give people time
to adjust to using spec objects.
2016-01-22 15:25:50 -08:00
Brett Cannon
63b8505281
Issue #25791 : Raise an ImportWarning when __spec__ or __package__ are
...
not defined for a relative import.
This is the start of work to try and clean up import semantics to rely
more on a module's spec than on the myriad attributes that get set on
a module. Thanks to Rose Ames for the patch.
2016-01-15 13:33:03 -08:00
Brett Cannon
3ad18dc7a7
Merge for issue #25500
2015-12-04 14:52:07 -08:00
Brett Cannon
f4f25fe576
Issue #25500 : Fix the language reference to not claim that import
...
statements search for __import__ in the global scope.
Thanks to Sergei Lebedev for finding the documentation bug.
2015-12-04 14:51:26 -08:00
R David Murray
3129571fb1
Merge: #25679 : spelling fix
2015-11-20 09:59:19 -05:00
R David Murray
0aaeacb3f1
Merge: #25679 : spelling fix
2015-11-20 09:58:51 -05:00
R David Murray
51d3f8b0ba
#25679 : spelling fix
2015-11-20 09:57:20 -05:00
Martin Panter
e56a919100
Issue #25523 : Merge a-to-an corrections from 3.5
2015-11-02 04:27:17 +00:00
Martin Panter
d2ad5718ad
Issue #25523 : Further a-to-an corrections new in 3.5
2015-11-02 04:20:33 +00:00
Berker Peksag
83356f7a3f
Issue #25418 : Fix markup in object.__hash__ documentation
...
Patch by TAKASE Arihiro.
2015-10-16 11:23:31 +03:00
Berker Peksag
85d5d902ce
Issue #25418 : Fix markup in object.__hash__ documentation
...
Patch by TAKASE Arihiro.
2015-10-16 11:23:11 +03:00
Berker Peksag
edb9111d41
Issue #25418 : Fix markup in object.__hash__ documentation
...
Patch by TAKASE Arihiro.
2015-10-16 11:22:50 +03:00
Martin Panter
430f657c67
Issue #25161 : Merge full stops from 3.5
2015-10-10 10:45:00 +00:00
Martin Panter
84835ab1cb
Issue #25161 : Merge full stops from 3.4 into 3.5
2015-10-10 10:44:25 +00:00
Martin Panter
d21e0b52f1
Issue #25161 : Add full stops in documentation; patch by Takase Arihiro
2015-10-10 10:36:22 +00:00
Martin Panter
3766ee5162
Issue #12067 : Merge comparisons doc from 3.5
2015-09-23 05:41:52 +00:00
Martin Panter
e52c41a714
Issue #12067 : Merge comparisons doc from 3.4 into 3.5
2015-09-23 05:34:48 +00:00
Martin Panter
aa0da864b8
Issue #12067 : Rewrite Comparisons section in the language reference
...
Some of the details of comparing mixed types were incorrect or ambiguous.
NotImplemented is only relevant at a lower level than the Expressions
chapter. Added details of comparing range() objects, and default behaviour
and consistency suggestions for user-defined classes. Patch from Andy Maier.
2015-09-23 05:28:13 +00:00
Robert Collins
df395991f6
Issue #9232 : Support trailing commas in function declarations.
...
For example, "def f(*, a = 3,): pass" is now legal.
Patch from Mark Dickinson.
2015-08-12 08:00:06 +12:00
Robert Collins
00cf3c394a
Issue #4395 : Better testing and documentation of binary operators.
...
Patch by Martin Panter.
2015-08-07 10:32:15 +12:00
Robert Collins
d84b29f805
Issue #4395 : Better testing and documentation of binary operators.
...
Patch by Martin Panter.
2015-08-07 10:22:54 +12:00
Robert Collins
888a6729da
Issue #24531 : Document that encoding lines cannot follow non-comment lines.
...
Patch from Terry Reedy
2015-08-06 21:14:34 +12:00
Robert Collins
0b2833eaf2
Issue #24531 : Document that encoding lines cannot follow non-comment lines.
...
Patch from Terry Reedy
2015-08-06 21:08:44 +12:00
Nick Coghlan
73c6f64a5e
Merge issue #24129 from 3.4
2015-08-05 23:23:24 +10:00
Nick Coghlan
91e561aa77
Issue #24129 : Clarify reference docs for name resolution.
...
This includes removing the assumption that readers will be familiar with the
name resolution scheme Python used prior to the introduction of lexical
scoping for function namespaces.
Patch by Ivan Levkivskyi.
2015-08-05 23:07:24 +10:00
Yury Selivanov
75b5ab5770
docs: Fix productionlist for async def functions
2015-08-01 16:19:36 -04:00
Berker Peksag
a1bddadddd
Issue #24713 : Use importlib.reload() in import reference document.
...
imp.reload() was deprecated in Python 3.4 and changed to call
importlib.reload().
Patch by Petr Viktorin.
2015-07-25 13:03:08 +03:00
Berker Peksag
7e732a7181
Issue #24713 : Use importlib.reload() in import reference document.
...
imp.reload() was deprecated in Python 3.4 and changed to call
importlib.reload().
Patch by Petr Viktorin.
2015-07-25 13:02:37 +03:00
Yury Selivanov
8fb307cd65
Issue #24619 : New approach for tokenizing async/await.
...
This commit fixes how one-line async-defs and defs are tracked
by tokenizer. It allows to correctly parse invalid code such
as:
>>> async def f():
... def g(): pass
... async = 10
and valid code such as:
>>> async def f():
... async def g(): pass
... await z
As a consequence, is is now possible to have one-line
'async def foo(): await ..' functions:
>>> async def foo(): return await bar()
2015-07-22 13:33:45 +03:00
Benjamin Peterson
47066ee3db
merge 3.4 ( #24610 )
2015-07-11 16:33:39 -07:00
Benjamin Peterson
acb3a4d88b
fix normalization example ( closes #24610 )
...
Patch by Chris Angelico
2015-07-11 16:32:55 -07:00
Benjamin Peterson
4801383c29
upgrade to Unicode 8.0.0
2015-06-27 15:45:56 -05:00
Yury Selivanov
66f8828bfc
Issue #24439 : Improve PEP 492 related docs.
...
Patch by Martin Panter.
2015-06-24 11:04:15 -04:00
Yury Selivanov
5376ba9630
Issue #24400 : Introduce a distinct type for 'async def' coroutines.
...
Summary of changes:
1. Coroutines now have a distinct, separate from generators
type at the C level: PyGen_Type, and a new typedef PyCoroObject.
PyCoroObject shares the initial segment of struct layout with
PyGenObject, making it possible to reuse existing generators
machinery. The new type is exposed as 'types.CoroutineType'.
As a consequence of having a new type, CO_GENERATOR flag is
no longer applied to coroutines.
2. Having a separate type for coroutines made it possible to add
an __await__ method to the type. Although it is not used by the
interpreter (see details on that below), it makes coroutines
naturally (without using __instancecheck__) conform to
collections.abc.Coroutine and collections.abc.Awaitable ABCs.
[The __instancecheck__ is still used for generator-based
coroutines, as we don't want to add __await__ for generators.]
3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to
allow passing native coroutines to the YIELD_FROM opcode.
Before this change, 'yield from o' expression was compiled to:
(o)
GET_ITER
LOAD_CONST
YIELD_FROM
Now, we use GET_YIELD_FROM_ITER instead of GET_ITER.
The reason for adding a new opcode is that GET_ITER is used
in some contexts (such as 'for .. in' loops) where passing
a coroutine object is invalid.
4. Add two new introspection functions to the inspec module:
getcoroutinestate(c) and getcoroutinelocals(c).
5. inspect.iscoroutine(o) is updated to test if 'o' is a native
coroutine object. Before this commit it used abc.Coroutine,
and it was requested to update inspect.isgenerator(o) to use
abc.Generator; it was decided, however, that inspect functions
should really be tailored for checking for native types.
6. sys.set_coroutine_wrapper(w) API is updated to work with only
native coroutines. Since types.coroutine decorator supports
any type of callables now, it would be confusing that it does
not work for all types of coroutines.
7. Exceptions logic in generators C implementation was updated
to raise clearer messages for coroutines:
Before: TypeError("generator raised StopIteration")
After: TypeError("coroutine raised StopIteration")
2015-06-22 12:19:30 -04:00
Terry Jan Reedy
bd44ce8ead
Merge with 3.4
2015-06-12 15:45:05 -04:00
Terry Jan Reedy
f5d4523844
Closes issue #24405 : mark set display as code.
2015-06-12 15:44:45 -04:00
Raymond Hettinger
ab89f9c27f
merge
2015-05-22 16:38:16 -07:00
Raymond Hettinger
9ecf9e2944
Issue #24219 : Remove duplicate literal in docs.
2015-05-22 16:37:49 -07:00
Yury Selivanov
f3e40fac10
Issue 24180: Documentation for PEP 492 changes.
2015-05-21 11:50:30 -04:00
Yury Selivanov
8170e8c0d1
PEP 479: Change StopIteration handling inside generators.
...
Closes issue #22906 .
2015-05-09 11:44:30 -04:00
Guido van Rossum
19dac071ef
Issue 24088: Clarify semantics of yield expression (merge from 3.4).
2015-05-05 12:04:35 -07:00
Guido van Rossum
d0150ad59e
Issue 24088: Clarify semantics of yield expression.
2015-05-05 12:02:01 -07:00
Benjamin Peterson
51f58059f6
merge 3.4 ( #24049 )
2015-04-24 12:02:53 -04:00
Benjamin Peterson
9bdd61338d
remove dead *-import checking code ( closes #24049 )
2015-04-24 12:02:29 -04:00
Barry Warsaw
b5a3d9bebb
Issue #24029 : Document the name binding behavior for submodule imports.
2015-04-22 18:38:26 -04:00
Barry Warsaw
2097f53ec3
Issue #24029 : Document the name binding behavior for submodule imports.
2015-04-22 18:29:16 -04:00
Brett Cannon
f299abdafa
Issue #23731 : Implement PEP 488.
...
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
2015-04-13 14:21:02 -04:00
Berker Peksag
770319d6bd
Issue #23912 : Fix code formatting in datamodel.rst.
...
Patch by James Edwards.
2015-04-11 14:59:30 +03:00
Berker Peksag
2995cc6855
Issue #23912 : Fix code formatting in datamodel.rst.
...
Patch by James Edwards.
2015-04-11 14:59:50 +03:00
Zachary Ware
4785f5e249
Merge with 3.4
2015-02-19 22:15:54 -06:00
Zachary Ware
57c616f1e4
Fix a typo pointed out on docs@
2015-02-19 22:15:36 -06:00
Ethan Furman
e62430eda4
Issue22988: clarify yield and exception blocks
2015-01-14 22:26:04 -08:00
Ethan Furman
2f825af728
Issue22988: clarify yield and exception blocks
2015-01-14 22:25:27 -08:00
Ethan Furman
9fdb0fe17b
Issue20467: clarify __init__'s role
2015-01-14 21:57:15 -08:00
Ethan Furman
845d33c526
Issue20467: clarify __init__'s role
2015-01-14 21:56:49 -08:00
Ethan Furman
119479f705
Issue20467: clarify __init__'s role
2015-01-14 21:56:10 -08:00
Brett Cannon
02d8454002
Issue #23014 : Make importlib.abc.Loader.create_module() required when
...
importlib.abc.Loader.exec_module() is also defined.
Before this change, create_module() was optional **and** could return
None to trigger default semantics. This change now reduces the
options for choosing default semantics to one and in the most
backporting-friendly way (define create_module() to return None).
2015-01-09 11:39:21 -05:00
Terry Jan Reedy
b67f6e27e1
Issue #23006 : Improve the documentation and indexing of dict.__missing__.
...
Add an entry in the language datamodel special methods section.
Revise and index its discussion in the stdtypes mapping/dict section.
2014-12-10 18:38:19 -05:00
R David Murray
c9f5f2ddc7
#22918 : Drop obsolete mention of 'keys' in datamodel __iter__ docs.
...
Patch by Chaitanya Agrawal.
2014-12-10 09:51:01 -05:00
Ethan Furman
b004943e9b
(3.4) Issue22780: reword NotImplemented docs to emphasise should
2014-11-26 21:15:35 -08:00
Terry Jan Reedy
e6b2b78a7d
Merge 3.4
2014-12-10 18:39:45 -05:00
R David Murray
892dbd18e1
Merge: #22918 : Drop obsolete mention of 'keys' in datamodel __iter__ docs.
2014-12-10 09:51:27 -05:00
Ethan Furman
9b55089999
Issue22780: reword NotImplemented docs to emphasise should
2014-11-26 21:17:53 -08:00
Brett Cannon
b6e2556d8f
Issue #22834 : Have import suppress FileNotFoundError when the current
...
working directory no longer exists.
Thanks to Martin Panter for the bug report.
2014-11-21 12:19:28 -05:00
Brett Cannon
d0c4ef175b
Issue #22242 : Try to make some import-related loader details clearer.
...
Thanks to Jon Poler for pointing this out.
2014-11-07 11:29:33 -05:00
Georg Brandl
e21a531ef1
merge with 3.4
2014-10-31 10:39:29 +01:00
Georg Brandl
a4c8c47961
#22613 : remaining corrections in extending/reference docs (thanks Jacques Ducasse)
2014-10-31 10:38:49 +01:00
Georg Brandl
794e9bf1fe
merge with 3.4
2014-10-29 10:27:06 +01:00
Georg Brandl
525d355984
Fixing broken links in doc, part 3: the rest
2014-10-29 10:26:56 +01:00
Georg Brandl
cadc3fdcb5
Merge with 3.4
2014-10-29 08:37:29 +01:00
Georg Brandl
e73778c1ac
Use https:// URLs when referring to python.org hosts.
2014-10-29 08:36:35 +01:00
Ethan Furman
58b2ddf392
Issue7186: document that __doc__ is not inherited by subclasses
2014-10-17 22:25:47 -07:00
Ethan Furman
f87f515057
Issue7186: document that __doc__ is not inherited by subclasses
2014-10-17 22:25:22 -07:00
R David Murray
2623a5db6f
Merge: #18176 : Change generic UCD PropList link to version specific link.
2014-10-09 20:47:31 -04:00
R David Murray
5f16f90d1b
#18176 : Change generic UCD PropList link to version specific link.
2014-10-09 20:45:59 -04:00
R David Murray
532783bd5e
Merge: #18176 : fix another reference and add it to the makeunicodedata comment.
2014-10-09 17:41:55 -04:00
R David Murray
5bd62420f4
#18176 : fix another reference and add it to the makeunicodedata comment.
2014-10-09 17:39:48 -04:00
Terry Jan Reedy
cd09571894
Merge with 3.4
2014-09-30 19:08:02 -04:00
Terry Jan Reedy
b6271f2d2b
Issue 22465: grammar, number agreement.
2014-09-30 19:07:49 -04:00
Serhiy Storchaka
1aca6e1a91
Issue #20643 : Removed unneeded (and wrong) class directives.
2014-09-05 23:28:19 +03:00
Serhiy Storchaka
848c8b29f6
Issue #20643 : Removed unneeded (and wrong) class directives.
2014-09-05 23:27:36 +03:00
Terry Jan Reedy
523136937f
Merge with 3.4
2014-08-23 19:29:58 -04:00
Terry Jan Reedy
65e3ecb3e2
Issue #22243 : fix except grammar in reference.
2014-08-23 19:29:47 -04:00
Benjamin Peterson
bd592417f4
add matrix multiplication operator to correct lists ( closes #22142 )
2014-08-06 22:50:30 -07:00
Nick Coghlan
e2197a4805
Merge issue #21667 from 3.4
2014-06-07 23:22:06 +10:00
Nick Coghlan
1462786f00
Issue #21667 : Clarify string data model description
2014-06-07 23:21:14 +10:00
R David Murray
cc568b1222
Merge #21662 : fix typo, improve sentence flow
2014-06-05 15:32:34 -04:00
R David Murray
2c0781853a
#21662 : fix typo, improve sentence flow
...
Patch by Steve Dougherty.
2014-06-05 15:31:56 -04:00
Zachary Ware
b369f5875c
Issue #21439 : Merge with 3.4
2014-06-03 09:34:39 -05:00
Zachary Ware
2f78b84c47
Issue #21439 : Fix a couple of typos.
2014-06-03 09:32:40 -05:00
Raymond Hettinger
a73a34d176
merge
2014-05-26 22:21:11 -07:00
Raymond Hettinger
aa7886dd3f
Issue 21439: Minor issues in the reference manual.
...
(Contributed by Feliks Kluzniak.)
2014-05-26 22:20:37 -07:00
Benjamin Peterson
384a3ea5c5
merge 3.4
2014-05-11 11:19:17 -07:00
Benjamin Peterson
5c8ce188ee
remove confusing delete indexing ( closes #21466 )
2014-05-11 11:18:51 -07:00
Zachary Ware
ed49265b91
Merge with 3.4
2014-05-06 09:19:16 -05:00
Zachary Ware
9fafc9f79a
Add prompts to interactive example.
...
This makes it match the new example below, and allows Sphinx's
"hide the prompts and output" feature to work.
2014-05-06 09:18:17 -05:00
Zachary Ware
4e6688d2b2
Issue #21366 : Document the fact that ``return`` in a ``finally`` clause
...
overrides a ``return`` in the ``try`` suite.
2014-05-06 09:07:51 -05:00
Zachary Ware
8edd532026
Issue #21366 : Document the fact that ``return`` in a ``finally`` clause
...
overrides a ``return`` in the ``try`` suite.
2014-05-06 09:07:13 -05:00
Terry Jan Reedy
727a463aa6
Merge with 3.4
2014-04-29 01:19:41 -04:00
Terry Jan Reedy
9cc9026294
Issue #21055 : Index (augmented) assignment symbols.
2014-04-29 01:19:17 -04:00
Terry Jan Reedy
e9dcfd1870
Merge with 3.4
2014-04-29 00:59:19 -04:00
Terry Jan Reedy
7c895edabc
Closes 21048: Index 'as' in import and with statements.
2014-04-29 00:58:56 -04:00
R David Murray
f7f981829b
#18628 : clarify index entry for source file encoding declaration.
...
Patch by Sam Lucidi.
2014-04-16 21:48:04 -04:00
R David Murray
16b8c619cd
Merge: #18628 : clarify index entry for source file encoding declaration.
2014-04-16 21:50:25 -04:00
Benjamin Peterson
d51374ed78
PEP 465: a dedicated infix operator for matrix multiplication ( closes #21176 )
2014-04-09 23:55:56 -04:00
Yury Selivanov
490a72e022
docs: Better wording for __objclass__ docs. Issue #19281
2014-04-08 14:01:12 -04:00
Yury Selivanov
b9aa8cb0c7
docs: Document __objclass__. Closes #19281 .
...
Initial patch by Nick Coghlan
2014-04-08 12:04:04 -04:00
Yury Selivanov
af8a4dfb04
docs: Better wording for __objclass__ docs. Issue #19281
2014-04-08 14:00:35 -04:00
Yury Selivanov
d3f918ca44
docs: Document __objclass__. Closes #19281 .
...
Initial patch by Nick Coghlan
2014-04-08 12:03:07 -04:00
Nick Coghlan
9aa00d1cd1
Issue #19697 : document more __main__.__spec__ quirks
2014-03-29 15:39:42 +10:00
Eric Snow
e50f9aa4bd
Issue #19697 : Document cases where __main__.__spec__ is None.
2014-03-28 18:10:33 -06:00
Larry Hastings
3732ed2414
Merge in all documentation changes since branching 3.4.0rc1.
2014-03-15 21:13:56 -07:00
R David Murray
14d7b718ba
#19953 : Clarify the wording of the augmented assignment discussion.
...
Patch by Priya Pappachan, based on suggestions from Terry Reedy
and myself.
2014-03-09 18:51:16 -04:00
Benjamin Peterson
71215c584a
merge 3.3 ( closes #12704 )
2014-01-26 22:58:42 -05:00
Benjamin Peterson
d1c85fd283
eliminate redundancy between yield stmt and yield expr docs ( closes #12704 )
...
Patch by Nikolaus Rath.
2014-01-26 22:52:08 -05:00
Larry Hastings
b7f5dcadf2
Merge 3.4.0b2 release revisions back into mainline.
2014-01-06 07:24:19 -08:00
Ethan Furman
df3ed242c0
Issue19995: %o, %x, %X now only accept ints
2014-01-05 06:50:30 -08:00
Larry Hastings
bfd715ebd1
Regenerated pydoc/topics.py, and fix a "suspicious" doc error.
2014-01-05 04:35:56 -08:00
Benjamin Peterson
002033ed63
correct word for __annotations__ doc ( closes #20110 )
...
Patch from Claudiu Popa.
2014-01-02 16:47:50 -06:00
Benjamin Peterson
8ec15f7a92
merge 3.3 ( #20110 )
2014-01-02 16:48:24 -06:00
Zachary Ware
1cb4f607d1
Merge with 3.3
2013-12-31 12:10:24 -06:00
Zachary Ware
340a692283
str subclasses may have non-empty __slots__, bytes subclasses can't.
2013-12-31 12:09:26 -06:00
Serhiy Storchaka
2a6145290b
Removed spaces before commas and periods.
2013-12-23 18:21:57 +02:00
Eric Snow
7cff4cd7e9
Issue #19713 : Fix mistakes in the import page of language reference.
...
These mistakes were introduced by the initial PEP 451 merge.
2013-12-16 23:10:50 -07:00
Serhiy Storchaka
0e90e99188
Issue #19795 : Improved markup of True/False constants.
2013-11-29 12:19:53 +02:00
Serhiy Storchaka
fbc1c26803
Issue #19795 : Improved markup of True/False constants.
2013-11-29 12:17:13 +02:00
Georg Brandl
472a65a710
Fix a few markup problems in the new import doc.
2013-11-24 12:39:56 +01:00
Eric Snow
b523f8433a
Implement PEP 451 (ModuleSpec).
2013-11-22 09:05:39 -07:00
Serhiy Storchaka
0d85b5c68d
Issue #19190 : Improve cross-references in builtin types and functions documentation.
2013-10-09 14:03:24 +03:00
Serhiy Storchaka
0d196edc37
Issue #19190 : Improve cross-references in builtin types and functions documentation.
2013-10-09 14:02:31 +03:00
Georg Brandl
c13d604193
merge with 3.3
2013-10-08 21:47:35 +02:00
Georg Brandl
0aaae26518
Clarify two points about division and shifting. Suggested by Albert Hofkamp on docs@.
2013-10-08 21:47:18 +02:00
Georg Brandl
100580f4c4
merge with 3.3
2013-10-08 21:28:42 +02:00
Georg Brandl
97f962339f
Add "->" as a delimiter token. Found by James Harding on docs@.
2013-10-08 21:28:22 +02:00
Georg Brandl
6930777c63
merge with 3.3
2013-10-06 10:28:48 +02:00
Georg Brandl
242e6a0bce
Use "lambda expression" as preferred to "lambda form".
2013-10-06 10:28:39 +02:00
Antoine Pitrou
58720d6145
Issue #17934 : Add a clear() method to frame objects, to help clean up expensive details (local variables) and break reference cycles.
2013-08-05 23:26:40 +02:00
Antoine Pitrou
796564c27b
Issue #18112 : PEP 442 implementation (safe object finalization).
2013-07-30 19:59:21 +02:00
Barry Warsaw
4958f714bd
- Issue #18440 : Clarify that `hash()` can truncate the value returned from an
...
object's custom `__hash__()` method.
2013-07-15 15:21:41 -04:00
Barry Warsaw
224a599c0c
- Issue #18440 : Clarify that `hash()` can truncate the value returned from an
...
object's custom `__hash__()` method.
2013-07-15 14:47:29 -04:00
Brett Cannon
82da8886cc
Issue #15767 : Revert 3a50025f1900 for ModuleNotFoundError
2013-07-04 17:48:16 -04:00
Brett Cannon
8f5ac5106e
Issue #15767 : Touch up ModuleNotFoundError usage by import.
...
Forgot to raise ModuleNotFoundError when None is found in sys.modules.
This led to introducing the C function PyErr_SetImportErrorSubclass()
to make setting ModuleNotFoundError easier.
Also updated the reference docs to mention ModuleNotFoundError
appropriately. Updated the docs for ModuleNotFoundError to mention the
None in sys.modules case.
Lastly, it was noticed that PyErr_SetImportError() was not setting an
exception when returning None in one case. That issue is now fixed.
2013-06-12 23:29:18 -04:00
Brett Cannon
4b4e38e7d4
Mention __cached__ in the import ref.
2013-05-25 11:32:50 -04:00
Brett Cannon
b961955e95
merge
2013-05-25 11:33:13 -04:00
Ezio Melotti
1fbb773c29
#17938 : merge with 3.3.
2013-05-09 15:34:09 +03:00
Ezio Melotti
955382ca54
#17938 : remove duplicate paragraphs.
2013-05-09 15:33:53 +03:00
Brett Cannon
4c14b5de1c
#17115,17116: Have modules initialize the __package__ and __loader__
...
attributes to None.
The long-term goal is for people to be able to rely on these
attributes existing and checking for None to see if they have been
set. Since import itself sets these attributes when a loader does not
the only instances when the attributes are None are from someone
overloading __import__() and not using a loader or someone creating a
module from scratch.
This patch also unifies module initialization. Before you could have
different attributes with default values depending on how the module
object was created. Now the only way to not get the same default set
of attributes is to circumvent initialization by calling
ModuleType.__new__() directly.
2013-05-04 13:56:58 -04:00
Georg Brandl
cf72c5e4ea
merge with 3.3
2013-04-14 10:13:50 +02:00
Georg Brandl
dec3b3f704
Clarify point in name mangling doc.
2013-04-14 10:13:42 +02:00
Georg Brandl
1bab7134a8
Merge with 3.3.
2013-03-28 13:28:55 +01:00
Georg Brandl
44ea77bd81
Closes #4159 : add LaTeX tabular column specifications to tables that otherwise are cut off or have overlapping text.
2013-03-28 13:28:44 +01:00
Brett Cannon
4802becb16
Issue #17117 : Have both import itself and importlib.util.set_loader()
...
set __loader__ on a module when set to None.
Thanks to Gökcen Eraslan for the fix.
2013-03-13 10:41:36 -07:00
Benjamin Peterson
1ef876cd28
evaluate positional defaults before keyword-only defaults ( closes #16967 )
2013-02-10 09:29:59 -05:00
Chris Jerdonek
c475278a94
Merge from 3.3: add links and index entries for "argument" and "parameter."
...
This adds to the work done for issue #15990 (i.e. f44b8d69e5fc and the
commits referenced there).
2012-12-25 14:59:46 -08:00
Chris Jerdonek
32bbc1c396
Merge from 3.2: add links and index entries for "argument" and "parameter."
...
This adds to the work done for issue #15990 (i.e. f44b8d69e5fc and the
commits referenced there).
2012-12-25 14:57:54 -08:00
Chris Jerdonek
b43099464a
Add additional links and index entries for "argument" and "parameter".
...
This adds to the work done for issue #15990 (i.e. f44b8d69e5fc and the
commits referenced there).
2012-12-25 14:54:44 -08:00
Ezio Melotti
16bdd4120d
#16677 : merge with 3.3.
2012-12-25 15:47:41 +02:00
Ezio Melotti
1be057673a
#16677 : merge with 3.2.
2012-12-25 15:46:58 +02:00
Ezio Melotti
9f929bb7df
#16677 : rename section header and fix markup.
2012-12-25 15:45:15 +02:00
Chris Jerdonek
7d2fad1be2
Merge from 3.3: link to "yield from" examples in yield documentation.
2012-12-23 15:35:23 -08:00
Chris Jerdonek
2654b86e88
Link to "yield from" examples in yield documentation.
...
This commit also simplifies the more advanced "yield from" example and removes
unused function parameters.
2012-12-23 15:31:57 -08:00
Chris Jerdonek
16459e8b16
Merge from 3.3: Add a str class entry to the string section (issue #16209 ).
...
This commit also moves the documentation for the str built-in function to
the new class entry. Links to :class:`str` now go to the class entry with
the string methods immediately afterwards.
2012-11-28 01:45:15 -08:00
Chris Jerdonek
bb4e941c6d
Add a str class entry to the "Text Sequence Type" section (issue #16209 ).
...
This commit also moves the documentation for the str built-in function to
the new class entry. Links to :class:`str` now go to the class entry with
the string methods immediately afterwards.
2012-11-28 01:38:40 -08:00
Chris Jerdonek
777db2d838
Fix label in docs (from issue #13538 ).
2012-11-21 05:32:44 -08:00
Chris Jerdonek
d675a2c48a
Merge from 3.3: Improve str() and object.__str__() docs (issue #13538 ).
2012-11-20 17:53:17 -08:00
Chris Jerdonek
5fae0e5854
Improve str() and object.__str__() documentation (issue #13538 ).
2012-11-20 17:45:51 -08:00