Discuss Scratch
- mybearworld
-
1000+ posts
"PYMode" [READ FULL POST]
PLEASE READ THE WHOLE POST BEFORE REPLYING.
Note that this is not rejected, as said by Za-Chary, here
These are Scratch's blocks:
While text based programming is rejected (§2.2), there could be a mode called “PYMode” where blocks would still be dragged and dropped, but the blocks would be more like a text-based language:
Related:
Note that this is not rejected, as said by Za-Chary, here
These are Scratch's blocks:
when gf clickedBut in a text-based language, it would look different, like this:
say [Hello!]
if <touching [mouse pointer v]?> then
change [color v] effect by (25)
else
think [Nothing happens] for (2) secs
self.say("Hello") if self.touching("mouse"): self.effects["color"] += 25 else: self.think("Nothing happens", secs=2)
when @greenFlag clicked // This can remain as-is.This could be integrated into the “Theme” section in the navigation bar.
self.say\("[Hello]"\) :: looks
if <self.touching\([mouse v]\) :: sensing>: {
self.effects\[[color v]\] += (25) :: looks
} else: {
self.think\("[Nothing happens]"\, secs=(2)) :: looks
} :: control
Related:
- change * and / to × or ⋅ and ÷ - This could be implemented when PYMode is disabled.
Note
If you want to include these blocks in your post, you'll need to escape certain characters.self.say("[Hello, world]") :: looks // self.say("[Hello, world]") :: looks
self.say\("[Hello, world!]"\) :: looks // self.say\("[Hello, world!]"\) :: looks
12/04/2024 - Made the post less terrible
17/12/2020 - Added the change * and / to × or ⋅ and ÷ suggestion Thanks PkmnQ
29/11/2020 - Little update Thanks sportfan9998!
29/11/2020 - Added Za-Chary's post stating that this is not rejected.
29/11/2020 - Renamed Word Mode to PYMode, and added “self” to the blocks Thanks Maximouse!
29/11/2020 - Created the topic
Last edited by mybearworld (April 12, 2024 13:59:31)
- Maximouse
-
1000+ posts
"PYMode" [READ FULL POST]
This would be a better idea if it was based on a particular programming language.
For example, if it was JavaScript:
Or Python:
“This” or “self” means “this sprite”.
Edit: And, of course, it should be named “JavaaScript mode” or “Python mode”, not “Word mode” (which is confusing).
For example, if it was JavaScript:
when flag clicked
this.say\([Hello]\) :: looks
if \(<this.touching\([mousePointer v]\) :: sensing>\) \{{
this.effects.[color v] += (25) :: looks
}\} else \{{
this.thinkSecs\([Nothing happens], (2)\) :: looks
}\} :: control
Or Python:
when flag clicked
self.say\([Hello]\) :: looks
if <self.touching\([mouse_pointer v]\) :: sensing>: {
self.effects.[color v] += (25) :: looks
} else: {
self.think\([Nothing happens], secs=(2)\) :: looks
} :: control
“This” or “self” means “this sprite”.
Edit: And, of course, it should be named “JavaaScript mode” or “Python mode”, not “Word mode” (which is confusing).
Last edited by Maximouse (Nov. 29, 2020 12:34:42)
- mybearworld
-
1000+ posts
"PYMode" [READ FULL POST]
I based my suggestion on Python. This would be a better idea if it was based on a particular programming language.
For example, if it was JavaScript:when flag clicked
this.say\([Hello]\) :: looks
if \(<this.touching\([mousePointer v]\) :: sensing>\) \{{
this.effects.[color v] += (25) :: looks
}\} else \{{
this.thinkSecs\([Nothing happens], (2)\) :: looks
}\} :: control
Or Python:when flag clicked
self.say\([Hello]\) :: looks
if <self.touching\([mouse_pointer v]\) :: sensing>: {
self.effects.[color v] += (25) :: looks
} else: {
self.think\([Nothing happens], secs=(2)\) :: looks
} :: control
“This” or “self” means “this sprite”.
Edit: And, of course, it should be named “JavaaScript mode” or “Python mode”, not “Word mode” (which is confusing).
I like the “self” idea, and rename it PYMode maybe?
- Maximouse
-
1000+ posts
"PYMode" [READ FULL POST]
That would work as a name too. “Self” is used in object oriented programming to refer to the current instance of a class. I like the “self” idea, and rename it PYMode maybe?
- mybearworld
-
1000+ posts
"PYMode" [READ FULL POST]
I know about “self”, I just didn't think of using itThat would work as a name too. “Self” is used in object oriented programming to refer to the current instance of a class. I like the “self” idea, and rename it PYMode maybe?

I edited the post now to include your ideas.
- SausageMcSauce
-
1000+ posts
"PYMode" [READ FULL POST]
I am leaning to no support. This might not be necessary and it would be easier for children to use blocks named in normal languages rather than one similar to a real programming language.
Also, Scratchers who do not speak English might get confused as programming language keywords are usually never translated into other languages. Scratch could do that, but it would seem unrealistic towards text-based programming languages to do that.
Also, Scratchers who do not speak English might get confused as programming language keywords are usually never translated into other languages. Scratch could do that, but it would seem unrealistic towards text-based programming languages to do that.
- Vibrato
-
1000+ posts
"PYMode" [READ FULL POST]
Linguistic languages are indeed easier to learn than programming languages when you're just starting out, but I get the feeling that this mode will be a toggle for more experienced programmers that can handle it. It may even make it easier for them. I am leaning to no support. This might not be necessary and it would be easier for children to use blocks named in normal languages rather than one similar to a real programming language.
Also, Scratchers who do not speak English might get confused as programming language keywords are usually never translated into other languages. Scratch could do that, but it would seem unrealistic towards text-based programming languages to do that.
- Maximouse
-
1000+ posts
"PYMode" [READ FULL POST]
This would be optional, and would be helpful for people who want to learn a text-based programming language. I am leaning to no support. This might not be necessary and it would be easier for children to use blocks named in normal languages rather than one similar to a real programming language.
- Za-Chary
-
1000+ posts
"PYMode" [READ FULL POST]
I'll be honest, this looks cool. Somewhat unnecessary, but it's still cool.
I'm also here to confirm that this is not rejected (before anyone tries saying otherwise).
I'm also here to confirm that this is not rejected (before anyone tries saying otherwise).
- mybearworld
-
1000+ posts
"PYMode" [READ FULL POST]
I'll be honest, this looks cool. Somewhat unnecessary, but it's still cool.
I'm also here to confirm that this is not rejected (before anyone tries saying otherwise).
Back to the OP
Last edited by mybearworld (Nov. 29, 2020 15:10:46)
- sportfan999
-
1000+ posts
"PYMode" [READ FULL POST]
As someone who is looking into Python, this is an interesting suggestion.
I think it looks just a little strange, seeing brackets, parentheses, periods, and whatnot on the Scratchblocks.
Also, how this would be implemented? Would it be a seperate button to toggle this, or would it be in the “Languages” section of the editor?
There are some uses in this, though, especially people who use text-based languages and Scratch.
If we are going to make this a ballot box, I guess you can put me as Semi-Support.
I think it looks just a little strange, seeing brackets, parentheses, periods, and whatnot on the Scratchblocks.
Also, how this would be implemented? Would it be a seperate button to toggle this, or would it be in the “Languages” section of the editor?
There are some uses in this, though, especially people who use text-based languages and Scratch.
If we are going to make this a ballot box, I guess you can put me as Semi-Support.
- mybearworld
-
1000+ posts
"PYMode" [READ FULL POST]
It actually is, but I guess you could get used to it. I think it looks just a little strange, seeing brackets, parentheses, periods, and whatnot on the Scratchblocks.
Maybe in account settings? Would it be a seperate button to toggle this, or would it be in the “Languages” section of the editor?
and Scratch..So me There are some uses in this, though, especially people who use text-based languages

- mybearworld
-
1000+ posts
"PYMode" [READ FULL POST]
I think this is the best idea. or would it be in the “Languages” section of the editor?
In 2.0 offline editor, you can actually select your own .po files
I made a py.po that looks like python, but it doesn't work on 3.0
- secretagent123
-
1000+ posts
"PYMode" [READ FULL POST]
Support this would be better for programmers with more experaince.
- mybearworld
-
1000+ posts
"PYMode" [READ FULL POST]
It is quite useful for experienced programmers. this seems unnecessary.
- Maximouse
-
1000+ posts
"PYMode" [READ FULL POST]
I don't actually think experienced programmers would use this, but people learning Python probably would.It is quite useful for experienced programmers. this seems unnecessary.
And a question: would lists use zero-based indexing in this mode? Because a block that looks like this:
([list v]\[(1)\] :: list)and uses one-based indexing could confuse users.
Edit: or the block could be
([list v]\[(1) - 1\] :: list)
Last edited by Maximouse (Dec. 17, 2020 15:02:50)
- mybearworld
-
1000+ posts
"PYMode" [READ FULL POST]
That's a great point. And a question: would lists use zero-based indexing in this mode? Because a block that looks like this:([list v]\[(1)\] :: list)and uses one-based indexing could confuse users.
Edit: or the block could be([list v]\[(1) - 1\] :: list)
I don't think the last one should be used..
Maybe if you drag one out the first time, it will open a little window telling you about it.