blockpy-edu / blockpy

Blockly that's more Python than JavaScript, powered with Skulpt
Apache License 2.0
398 stars 133 forks source link

Python 3 #26

Closed Immortalin closed 7 years ago

Immortalin commented 7 years ago

What is the state of python 3 support?

acbart commented 7 years ago

Hi there! Sorry for the delay in response - I just got back from SIGCSE and it's been quite hectic.

Python 3 support for BlockPy is basically whatever Python 3 support in Skulpt is. Unfortunately, that's a complicated discussion in itself. Python 3 represents some major changes in both syntax and capabilities. Some of those features are supported (e.g., print function with parentheses, set literals) and some are not (e.g., the asynch/await constructs). It can be hard to keep track of what Skulpt supports in that regard, and in some cases it does both (e.g., print is a statement or a function depending on a boolean flag, Sk.python3).

The design goal of BlockPy is to match Python 3 when it is possible, since 2 is so quickly on its way out. However, for most of the intended educational settings that BlockPy is meant to be used in, the 2/3 conversation is limited to a few key places. And honestly, it's sometimes easier for pedagogical purposes to hide some details. For instance, having to explain why the higher order functions return generators requires a whole host of additional knowledge components, so it's helpful right now that we can hand-wave that problem.

So, to answer your question, it really depends on what Python 3 features are being hoped for.