Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teleport method for turtle class #88773

Open
begilbert-sys mannequin opened this issue Jul 12, 2021 · 4 comments
Open

Teleport method for turtle class #88773

begilbert-sys mannequin opened this issue Jul 12, 2021 · 4 comments
Labels
3.11 expert-tkinter type-feature A feature request or enhancement

Comments

@begilbert-sys
Copy link
Mannequin

begilbert-sys mannequin commented Jul 12, 2021

BPO 44607
Nosy @serhiy-storchaka, @vedgar, @begilbert-sys

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2021-07-12.06:48:56.540>
labels = ['type-feature', 'expert-tkinter', '3.11']
title = 'Teleport method for turtle class'
updated_at = <Date 2021-07-12.17:42:12.710>
user = 'https://github.com/begilbert-sys'

bugs.python.org fields:

activity = <Date 2021-07-12.17:42:12.710>
actor = 'Muffinlicious'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Tkinter']
creation = <Date 2021-07-12.06:48:56.540>
creator = 'Muffinlicious'
dependencies = []
files = []
hgrepos = []
issue_num = 44607
keywords = []
message_count = 4.0
messages = ['397286', '397292', '397303', '397341']
nosy_count = 3.0
nosy_names = ['serhiy.storchaka', 'veky', 'Muffinlicious']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue44607'
versions = ['Python 3.11']

@begilbert-sys
Copy link
Mannequin Author

begilbert-sys mannequin commented Jul 12, 2021

I use turtle pretty often in a teaching setting. It's extremely common that I'll define the following function at the top of my code:

def teleport(x, y):
    turtle.penup()
    turtle.setpos(x, y)
    turtle.pendown()

Shouldn't this sort of method already exist within the turtle class?

@begilbert-sys begilbert-sys mannequin added 3.11 expert-tkinter type-feature A feature request or enhancement labels Jul 12, 2021
@vedgar
Copy link
Mannequin

vedgar mannequin commented Jul 12, 2021

In my view, turtle is a great tool for exploring _polar_ coordinates. If you set emphasis to rectangular coordinates, there are many tools that are much better.

Second, your function might be ok for you, but it is really not suitable for standard library. Probably you meant something like (a method)

    def teleport(self, *args):
        restore = self.isdown()
        self.penup()
        self.setpos(*args)
        if restore: self.pendown()

@serhiy-storchaka
Copy link
Member

What other Turtle implementations support the teleport command?

@begilbert-sys
Copy link
Mannequin Author

begilbert-sys mannequin commented Jul 12, 2021

Turtle is the most accessible and well-known drawing module for kids to use so teleporting makes more sense in the context of drawing random shapes or small pictures around the screen. I've seen the penup/goto/pendown combo so often that I figure it at least warrants a suggestion. Also my crappy function was mostly just meant as an outline, haha.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 expert-tkinter type-feature A feature request or enhancement
Projects
Status: No status
Development

No branches or pull requests

1 participant