Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Suggestions: check for name collisions between modules and items in a module #144285

Open
Assignees
johnslavik
Labels
stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement
@ngoldbaum

Description

@ngoldbaum

This suggestion is pretty confusing, particularly if you don't understand thatdatetime.datetime is a thing.

>>>importdatetime>>>datetime.now()Traceback (mostrecentcalllast):File"<python-input-1>",line1,in<module>datetime.now()^^^^^^^^^^^^AttributeError:module'datetime'hasnoattribute'now'.Didyoumean:'datetime.now'?

When the suggestion finds a match like this, it should also check to make sure the module name and the suggestion don't clash. Perhaps it should also be able to suggestdatetime.datetime.now?

Linked PRs

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2026 Movatter.jp