Re: Python

2025-12-17 Thread Chris Angelico via Python-list
On Thu, 18 Dec 2025 at 18:01, c186282 wrote: >Oh, I usually write "i=i+2". It's a bit more >clear and becomes the same code anyway. += >is more a 'C' thing. As are semicolons and /* */ comments. ChrisA -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Rock Paper Scissors Code Bug?

2025-12-17 Thread Gregg Drennan via Python-list
The other recommendation i would make is to shorten the response the player needs to give when choosing their option. "R", "P", "S" is sufficient to determine the player's choice. Making the player enter the whole word introduces opportunity for misspellings. I would also allow the player to ent

Re: Python

2025-12-17 Thread rbowman
On Thu, 18 Dec 2025 03:28:34 - (UTC), John Levine wrote: > According to c186282 : >> Well ... I'll better understand, and be able to mod, my old programs >> better than you. I find 'excessive' commenting anything BUT >> 'excessive'. I *enjoy* writing out the meaning and implications of

Re: Python

2025-12-17 Thread c186282
On 12/17/25 17:11, Lawrence D’Oliveiro wrote: On Wed, 17 Dec 2025 16:17:30 -0500, Dan Espen wrote: Lawrence D’Oliveiro writes: On Mon, 15 Dec 2025 12:57:57 +, mm0fmf wrote: On 14 Dec 2025 11:56:42 GMT, Stéphane CARPENTIER wrote: My issues with python are: - It's using indentations, s

Re: Python

2025-12-17 Thread c186282
On 12/17/25 22:28, John Levine wrote: According to c186282 : Well ... I'll better understand, and be able to mod, my old programs better than you. I find 'excessive' commenting anything BUT 'excessive'. I *enjoy* writing out the meaning and implications of almost every step. That'

Re: Python

2025-12-17 Thread John Levine
According to c186282 : > Well ... I'll better understand, and be able to mod, my > old programs better than you. I find 'excessive' commenting > anything BUT 'excessive'. I *enjoy* writing out the meaning > and implications of almost every step. That's fine as long as it's done with adequ

Re: Python

2025-12-17 Thread c186282
On 12/17/25 14:17, rbowman wrote: On Wed, 17 Dec 2025 03:11:09 -0500, c186282 wrote: Probably 50% of the text in my code - doesn't matter which lang - is 'comments'. I looked at some of my code and it's pretty much comment free. There are a couple of .c files with comments that I reus

Re: Python

2025-12-17 Thread rbowman
On Wed, 17 Dec 2025 22:13:21 +, Richard Kettlewell wrote: > If you prefer the comment markers to match the indentation of the whole > block, that works too: I keep it simple and use the first column, s/^/#/ in vim. s/^#// to make them go away. -- https://mail.python.org/mailman3//lists/py

RE: Python

2025-12-17 Thread Em
Then """ and """ are your better friends. Dan Espen[-] It is interesting how the """ has to obey the indention rule. -- https://mail.python.org/mailman3//lists/python-list.python.org -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Python

2025-12-17 Thread Richard Kettlewell
Dan Espen writes: > Lawrence D’Oliveiro writes: >> On Mon, 15 Dec 2025 12:57:57 +, mm0fmf wrote: >>> On 14 Dec 2025 11:56:42 GMT, Stéphane CARPENTIER wrote: My issues with python are: - It's using indentations, so when I comment a block of code to see what happens, it breaks

Re: Python

2025-12-17 Thread Dan Espen via Python-list
Lawrence D’Oliveiro writes: > On Mon, 15 Dec 2025 12:57:57 +, mm0fmf wrote: > >> On 14 Dec 2025 11:56:42 GMT, Stéphane CARPENTIER wrote: >> >>> My issues with python are: >>> - It's using indentations, so when I comment a block of code to see >> >> ''' and ''' are your friend > > Unless the

Re: Python

2025-12-17 Thread rbowman
On Wed, 17 Dec 2025 03:11:09 -0500, c186282 wrote: >Probably 50% of the text in my code - doesn't matter which lang - is >'comments'. I looked at some of my code and it's pretty much comment free. There are a couple of .c files with comments that I reused from another project that have

Re: Python

2025-12-17 Thread c186282
On 12/16/25 20:54, rbowman wrote: On Tue, 16 Dec 2025 21:45:42 - (UTC), Lawrence D’Oliveiro wrote: On Mon, 15 Dec 2025 12:57:57 +, mm0fmf wrote: On 14 Dec 2025 11:56:42 GMT, Stéphane CARPENTIER wrote: My issues with python are: - It's using indentations, so when I comment a block of