Skip to content

Create Print alias in py2d#2575

Closed
Avasam wants to merge 1 commit intomhammond:mainfrom
Avasam:Print-alias-in-py2d
Closed

Create Print alias in py2d#2575
Avasam wants to merge 1 commit intomhammond:mainfrom
Avasam:Print-alias-in-py2d

Conversation

@Avasam
Copy link
Collaborator

@Avasam Avasam commented Apr 19, 2025

Split off from #2385

There used to be a Print = __builtins__.__dict__["print"] alias

This creates a conflict between both approaches, so I'm splitting this change off from #2385 and leaving it as a separate decision whether calling print(..., file=fp) or Print(...) is preferable

@Avasam
Copy link
Collaborator Author

Avasam commented Apr 19, 2025

Actually, sys.stdout is already the default when file=None...
https://docs.python.org/3/library/functions.html#print

I think this is better off simplified to just removing file=fp

@Avasam Avasam closed this Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant