You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Doc/whatsnew/3.13.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -274,7 +274,7 @@ Improved error messages
274
274
File "/home/me/random.py", line 3, in <module>
275
275
print(random.randint(5))
276
276
^^^^^^^^^^^^^^
277
-
AttributeError: module 'random' has no attribute 'randint' (consider renaming '/home/me/random.py' since it has the same name as the standard library module named 'random' and the import system gives it precedence)
277
+
AttributeError: module 'random' has no attribute 'randint' (consider renaming '/home/me/random.py' since it has the same name as the standard library module named 'random' and prevents importing that standard library module)
278
278
279
279
Similarly, if a script has the same name as a third-party
280
280
module that it attempts to import and this results in errors,
@@ -289,7 +289,7 @@ Improved error messages
289
289
File "/home/me/numpy.py", line 3, in <module>
290
290
np.array([1, 2, 3])
291
291
^^^^^^^^
292
-
AttributeError: module 'numpy' has no attribute 'array' (consider renaming '/home/me/numpy.py' if it has the same name as a third-party module you intended to import)
292
+
AttributeError: module 'numpy' has no attribute 'array' (consider renaming '/home/me/numpy.py' if it has the same name as a library you intended to import)
0 commit comments