[issue37968] The turtle

2019-08-28 Thread Yehuda Katz


New submission from Yehuda Katz :

1 - turtle bug: If I don't put parenthesis at the end of a line, I don't get 
error message. Try this:

from turtle import *
fd(50); rt
done()


2 - request: Highly desirable a function that draws a circle with radius n  
AROUND THE TURTLE.

Thank you and have a wonderful day.

--
files: untitled.py
messages: 350662
nosy: Yehuda
priority: normal
severity: normal
status: open
title: The turtle
versions: Python 3.7
Added file: https://bugs.python.org/file48564/untitled.py

___
Python tracker 
<https://bugs.python.org/issue37968>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37968] The turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

Sorry to say but these don't satisfy my issues.

1 the next code SHOULD produce an error message. Think that it's followed
by a few dozens of code lines:
from turtle import *
fd; rt(90)
2 Old Logo had a useful function of creating a circle AROUND THE TURTLE. It
would be very nice it such a function was built-in in turtle module.
Giving this to student as a problem is not a good answer, it's more like a
sort of "pass the baby" solution.

Thank you for the fast reply.

Yehuda Katz (Israel)

On Wed, Aug 28, 2019 at 7:04 PM Nick Timkovich 
wrote:

>
> Nick Timkovich  added the comment:
>
> Regarding #1: In Python, you may refer to a variable's name (e.g. `rt`,
> which is a function), which often has no effect in a script. In the REPL
> (where you see >>>) it is useful to inspect the object:
>
> >>> turtle.rt
> 
>
> In order to call that name/function, parentheses are *required* unlike
> other languages where they are optional (Ruby). So, you don't get an error
> message, but one is not expected. Linting tools can alert you to statements
> that don't appear to have an effect.
>
> Regarding #2: Students of the turtle could create a reusable function to
> draw a circle with the turtle and return to the starting position. It would
> be an excellent exercise with multiple solutions!
>
> --
> nosy: +nicktimko
>
> ___
> Python tracker 
> <https://bugs.python.org/issue37968>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue37968>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37968] The turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

Hi,

Sorry to say but these don't satisfy my issues.

1 the next code SHOULD produce an error message. Think that it's followed
by a few dozens of code lines:
from turtle import *
fd; rt(90)
2 Old Logo had a useful function of creating a circle AROUND THE TURTLE. It
would be very nice it such a function was built-in in Python's turtle
module.
Giving this to student as a problem is not a good answer, it's more like a
sort of "pass the baby" solution.

Thank you for the fast reply.

On Wed, Aug 28, 2019 at 7:26 PM Yehuda Katz  wrote:

>
> Yehuda Katz  added the comment:
>
> Sorry to say but these don't satisfy my issues.
>
> 1 the next code SHOULD produce an error message. Think that it's followed
> by a few dozens of code lines:
> from turtle import *
> fd; rt(90)
> 2 Old Logo had a useful function of creating a circle AROUND THE TURTLE. It
> would be very nice it such a function was built-in in turtle module.
> Giving this to student as a problem is not a good answer, it's more like a
> sort of "pass the baby" solution.
>
> Thank you for the fast reply.
>
> Yehuda Katz (Israel)
>
> On Wed, Aug 28, 2019 at 7:04 PM Nick Timkovich 
> wrote:
>
> >
> > Nick Timkovich  added the comment:
> >
> > Regarding #1: In Python, you may refer to a variable's name (e.g. `rt`,
> > which is a function), which often has no effect in a script. In the REPL
> > (where you see >>>) it is useful to inspect the object:
> >
> > >>> turtle.rt
> > 
> >
> > In order to call that name/function, parentheses are *required* unlike
> > other languages where they are optional (Ruby). So, you don't get an
> error
> > message, but one is not expected. Linting tools can alert you to
> statements
> > that don't appear to have an effect.
> >
> > Regarding #2: Students of the turtle could create a reusable function to
> > draw a circle with the turtle and return to the starting position. It
> would
> > be an excellent exercise with multiple solutions!
> >
> > --
> > nosy: +nicktimko
> >
> > ___
> > Python tracker 
> > <https://bugs.python.org/issue37968>
> > ___
> >
>
> --
>
> ___
> Python tracker 
> <https://bugs.python.org/issue37968>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue37968>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37968] The turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

Such a function would be welcomed.
For the best of my (limited) knowledge, there's currently no arc() function
in module turtle.

I can't think about a proper name... Sorry.

Yehuda

On Wed, Aug 28, 2019 at 7:55 PM Nick Timkovich 
wrote:

>
> Nick Timkovich  added the comment:
>
> Resolving #1 as you suggest is next to impossible. Python can not deduce
> if you meant to call the function or just refer to its name. Admittedly,
> the latter is strange in non-interactive contexts, but it is valid.
>
> #2, as far as I can tell Logo had an ARC command:
>
> ARC angle radius
>
> draws an arc of a circle, with the turtle at the center,
> with the specified radius, starting at the turtle's
> heading and extending clockwise through the specified
> angle.  The turtle does not move.
>
> I guess I don't know the history about why there's turtle.circle in Python
> which *does* move the turtle, and has the center *not* at the turtle.
> Adding an equivalent "turtle.arc" function might be useful, though the
> naming would be a bit confusing. Can you propose a better name and define
> exactly how it would work?
>
> --
>
> ___
> Python tracker 
> <https://bugs.python.org/issue37968>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue37968>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

G-R-E-A-T.

Yehuda,
Israel

On Wed, Aug 28, 2019 at 8:29 PM Mark Dickinson 
wrote:

>
> Mark Dickinson  added the comment:
>
> Updated title, type and Python version (this would be a new feature, so
> would be targeted at Python 3.9).
>
> --
> components: +Library (Lib)
> title: The turtle -> Add a turtle module function to draw a circle
> centered at the turtle
> type:  -> enhancement
> versions: +Python 3.9 -Python 3.7
>
> ___
> Python tracker 
> <https://bugs.python.org/issue37968>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue37968>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

G-R-E-A-T.

Yehuda (Israel)

On Wed, Aug 28, 2019 at 8:29 PM Mark Dickinson 
wrote:

>
> Mark Dickinson  added the comment:
>
> Updated title, type and Python version (this would be a new feature, so
> would be targeted at Python 3.9).
>
> --
> components: +Library (Lib)
> title: The turtle -> Add a turtle module function to draw a circle
> centered at the turtle
> type:  -> enhancement
> versions: +Python 3.9 -Python 3.7
>
> ___
> Python tracker 
> <https://bugs.python.org/issue37968>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue37968>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

Thanks for the clarifications.
Yehuda(Israel)

On Thu, Aug 29, 2019 at 3:36 AM Raymond Hettinger 
wrote:

>
> Raymond Hettinger  added the comment:
>
> Yehuda, thank you for the suggestions, but we're going to decline.
>
> --
> resolution:  -> rejected
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> <https://bugs.python.org/issue37968>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue37968>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

Thanks for the clarifications.
Yehuda(Israel)

On Thu, Aug 29, 2019 at 3:36 AM Raymond Hettinger 
wrote:

>
> Raymond Hettinger  added the comment:
>
> Yehuda, thank you for the suggestions, but we're going to decline.
>
> --
> resolution:  -> rejected
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> <https://bugs.python.org/issue37968>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue37968>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-29 Thread Yehuda Katz


Yehuda Katz  added the comment:

Nick, thank you. What you linked here is Logo, with different logic &
syntax than Python.
The hand analogy is interesting, thank you.
I rest my case and have good night from Israel.

Yehuda

On Thu, Aug 29, 2019 at 11:40 PM Nick Timkovich 
wrote:

>
> Nick Timkovich  added the comment:
>
> To clarify, there is an "ARC" command in Logo that draws a circle/circle
> segment *centered on* the turtle. Reference:
> http://fmslogo.sourceforge.net/manual/command-arc.html Examples:
> https://personal.utdallas.edu/~veerasam/logo/ That command is not/has not
> been implemented in Python's turtle graphics.
>
> As Eric mentioned, it could be considered a benefit as the principle of
> turtle graphics is that turtles have no arms to move the pen away from
> their body (adolescent abnormal assassin turtles, notwithstanding).
>
> --
>
> ___
> Python tracker 
> <https://bugs.python.org/issue37968>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue37968>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-30 Thread Yehuda Katz


Yehuda Katz  added the comment:

Eric, thank you, I'm sorry.
Yehuda

On Thu, Aug 29, 2019 at 11:47 PM Eric V. Smith 
wrote:

>
> Eric V. Smith  added the comment:
>
> It's turtle.circle:
>
> https://docs.python.org/3.5/library/turtle.html#turtle.circle
>
> @Yehuda: this isn't the appropriate place for help on how the turtle
> module works. Please consider the python-tutor list. See
> https://mail.python.org/mailman/listinfo/tutor
>
> --
>
> ___
> Python tracker 
> <https://bugs.python.org/issue37968>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue37968>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43289] step bug in turtle's for loop

2021-02-21 Thread Yehuda Katz


New submission from Yehuda Katz :

from turtle import *

col = ["black", "white"]

for rad in range(40, 0, -1): 
dot(5*rad, col[rad % 2])

done()
==
Any other step than -1 crashes the code.

Thank you.

--
messages: 387472
nosy: Yehuda
priority: normal
severity: normal
status: open
title: step bug in turtle's for loop
type: behavior
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43289>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43289] step bug in turtle's for loop

2021-02-21 Thread Yehuda Katz


Yehuda Katz  added the comment:

Correction to my msg387472: Every *even* step crashes the code.

--

___
Python tracker 
<https://bugs.python.org/issue43289>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43289] step bug in turtle's for loop

2021-02-22 Thread Yehuda Katz


Yehuda Katz  added the comment:

Thank you Dennis for taking the time to answer.
Yehuda

<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Feb 22, 2021 at 3:21 AM Dennis Sweeney 
wrote:

>
> Dennis Sweeney  added the comment:
>
> If I understand correctly, changing the -1 to a -2 does not actually make
> the program "crash" -- you just only see one black circle.
>
> The reason is that range(40, 0, -2) produces 40, 38, 36, etc., all of
> which are even numbers, so rad % 2 is always 0, so col[rad % 2] is always
> "black". You could try:
>
> for index, rad in enumerate(range(40, 0, -2)):
> dot(5*rad, col[index % 2])
>
> In the future, I would suggest asking questions like this on
> StackOverflow, since this is not a bug in Python itself.
>
> --
> nosy: +Dennis Sweeney
>
> ___
> Python tracker 
> <https://bugs.python.org/issue43289>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue43289>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43289] step bug in turtle's for loop

2021-02-26 Thread Yehuda Katz


Yehuda Katz  added the comment:

Thank you Terry, and take care.

Yehuda

<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sat, Feb 27, 2021 at 4:41 AM Terry J. Reedy 
wrote:

>
> Terry J. Reedy  added the comment:
>
> Yehuda, one can also ask questions like this on python-list.
>
> In the future, when responding by email, please delete the message being
> responded to, so it does not get repeated when posted to the web page.
>
> --
> nosy: +terry.reedy
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> <https://bugs.python.org/issue43289>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue43289>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com