GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Teleport method for turtle class · Issue #88773 · python/cpython

Teleport method for turtle class #88773

New issue
Copy link
New issue
Copy link
Closed
#103974
Closed
Teleport method for turtle class#88773
#103974
Copy link
Assignees
gpshead
Labels
topic-tkintertype-featureA feature request or enhancementA feature request or enhancement

Description

begilbert-sys
mannequin
opened on Jul 12, 2021
Issue body actions
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']

Linked PRs

  • gh-88773: Added teleport method to Turtle library #103974

Activity

  1. begilbert-sys commented on Jul 12, 2021

    @begilbert-sys
    begilbert-sysmannequin
    on Jul 12, 2021
    MannequinAuthor
    More actions

    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?

  2. begilbert-sys
    added
    3.11only security fixesonly security fixes
    topic-tkinter
    type-featureA feature request or enhancementA feature request or enhancement
    on Jul 12, 2021
  3. vedgar commented on Jul 12, 2021

    @vedgar
    vedgarmannequin
    on Jul 12, 2021
    Mannequin
    More actions

    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()
  4. serhiy-storchaka commented on Jul 12, 2021

    @serhiy-storchaka
    serhiy-storchaka
    on Jul 12, 2021
    Member
    More actions

    What other Turtle implementations support the teleport command?

  5. begilbert-sys commented on Jul 12, 2021

    @begilbert-sys
    begilbert-sysmannequin
    on Jul 12, 2021
    MannequinAuthor
    More actions

    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.

  6. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  7. serhiy-storchaka
    added this to Turtle issues 🐢on May 21, 2022
  8. liam-gersten commented on Apr 17, 2023

    @liam-gersten
    liam-gersten
    on Apr 17, 2023
    Contributor
    More actions

    Hello, my name is Liam, and I’m part of a student software engineer group of 4 at Carnegie Mellon. We’ve been tasked with contributing to an open source project, and this issue seems like a great first start. Would you mind assigning this to me (my group)? Also, you might see the same comment on 1-2 other issues, since we’ll likely be working on more than just one for our assignment.

  9. gpshead
    removed
    3.11only security fixesonly security fixes
    on Apr 28, 2023
  10. gpshead commented on Apr 28, 2023

    @gpshead
    gpshead
    on Apr 28, 2023
    Member
    More actions

    FWIW I agree that a teleport is a useful feature addition.

    Some existing other Turtle teleport references:

    • https://weinman.cs.grinnell.edu/courses/CSC151/2014F/labs/turtle-graphics-lab.html - a Scheme or LISP looking thing containing !turtle-teleport to x y coordinates.
    • https://wiki.ros.org/turtlesim#Services Robot Operating System (ROS) has a teleport-absolute and teleport-relative in its turtlesim. which takes an x y and theta angle. why it takes an angle isn't clear (i suppose to declare the new orientation); that isn't something i'd copy.

    teleport is mirroring the existing goto/setpos/setposition absolute cartesian positioning API, but with more convenient semantics. A polar coordinate system teleport would be a different api and is out of scope for this feature request.

    i'm reviewing the PR.

  11. gpshead
    closed this as completedin #103974on Apr 30, 2023
  12. github-project-automation
    moved this to Done in Turtle issues 🐢on Apr 30, 2023
  13. gpshead
    added a commit that references this issue on Apr 30, 2023

    gh-88773: Added teleport method to Turtle library (#103974)

    74a2b79
  14. gpshead
    self-assigned this
    on Apr 30, 2023
  15. gpshead commented on Apr 30, 2023

    @gpshead
    gpshead
    on Apr 30, 2023
    Member
    More actions

    Thanks for your contribution Liam, merged. We don't often touch the turtle module as it's a bit of a leftover thing that we keep in the standard library because of its usefulness in educational settings, but this feature addition made sense.

    Reacted by Hugo van Kemenade
  16. carljm
    added a commit that references this issue on May 1, 2023

    Merge branch 'main' into supermon

    159b2aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @gpshead
    gpshead

Labels

topic-tkintertype-featureA feature request or enhancementA feature request or enhancement

Projects

  • Turtle issues 🐢
    Status
    Done
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.