Skip to content

Magic str() method creation in cgen should be moved higher. #25826

@JalonSolov

Description

@JalonSolov

Presently, if an object does not have an explicitly defined str() method, and a request is made to print said object, a "magic" str() method is created in cgen.

This process is fine as far as it goes, but the "magic" str() methods need to be created before any backend is called, so that all backends can use them.

As it stands now, the "magic" str() method creation has to be duplicated in every backend separately.

Recent issue about this in #25825

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions