Skip to content

Conversation

terryjreedy
Copy link
Member

Replace self._canvas and self.scanvas, both bound to canvas, with self.canvas, which is accessed in other methods. Replace _s_ with screen and _s_._canvas with canvas. Add a comment explaining the unorthodox use of function turtle.Screen and singleton class turtle._Screen.

Replace `self._canvas` and `self.scanvas`, both bound to `canvas`,
with `self.canvas, which is accessed in other methods.
Replace `_s_` with `screen` and `_s_._canvas` with `canvas`.
Add a comment explaining the unorthodox use of
function turtle.Screen and singleton class turtle._Screen.
@terryjreedy
Copy link
Member Author

I verified duplicate references with a is b and ran multiple demos after the change.

@terryjreedy terryjreedy merged commit 96f95df into python:main May 6, 2023
@miss-islington
Copy link
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-104238 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label May 6, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 6, 2023
Replace `self._canvas` and `self.scanvas`, both bound to `canvas`,
with `self.canvas, which is accessed in other methods.
Replace `_s_` with `screen` and `_s_._canvas` with `canvas`.
Add a comment explaining the unorthodox use of
function turtle.Screen and singleton class turtle._Screen.
(cherry picked from commit 96f95df)

Co-authored-by: Terry Jan Reedy <[email protected]>
@terryjreedy terryjreedy deleted the tdemo branch May 6, 2023 15:09
terryjreedy added a commit that referenced this pull request May 6, 2023
)

Rewrite the turtledemo makeGraphFrame method (GH-104224)

Replace `self._canvas` and `self.scanvas`, both bound to `canvas`,
with `self.canvas, which is accessed in other methods.
Replace `_s_` with `screen` and `_s_._canvas` with `canvas`.
Add a comment explaining the unorthodox use of
function turtle.Screen and singleton class turtle._Screen.
(cherry picked from commit 96f95df)

Co-authored-by: Terry Jan Reedy <[email protected]>
jbower-fb pushed a commit to jbower-fb/cpython that referenced this pull request May 8, 2023
Replace `self._canvas` and `self.scanvas`, both bound to `canvas`,
with `self.canvas, which is accessed in other methods.
Replace `_s_` with `screen` and `_s_._canvas` with `canvas`.
Add a comment explaining the unorthodox use of
function turtle.Screen and singleton class turtle._Screen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants