aroberge / avantpy Goto Github PK
View Code? Open in Web Editor NEWPython with training wheels: executable pseudocode in any language
Home Page: https://aroberge.github.io/avantpy/docs/html/
License: MIT License
Python with training wheels: executable pseudocode in any language
Home Page: https://aroberge.github.io/avantpy/docs/html/
License: MIT License
Is your feature request related to a problem? Please describe.
Python tracebacks are too difficult to understand for beginners. Having a simpler way to report them to users would be useful.
Describe the solution you'd like
I want something like the following:
Describe alternatives you've considered
None exists in the standard Python land, as far as I know.
Additional context
None.
Describe the feature you'd like to see added.
In the spirit of this project, the most important information is shown first. Currently, the Dialect used: output is fairly high up, before the human-readable description. In the common case, it says "None", which can imply that this is the user's error. But It's essentially debug info, not adding relevant info for the person who's wondering why they have an error. I.e., the "dialect" doesn't relate to their error. It's an avantpy implementation detail.
I propose that we don't show it at all. And only show it in response to a 'verbose' or 'show configs' option.
Who would benefit most from this?
This would mostly benefit:
Is this something you would like to contribute
Sure, I could contribute this.
Context
From the blog post, AvantPy Needs You:
Please feel free to add your thoughts regarding a proposal to the PSF.
See the current status at https://github.com/aroberge/avantpy/blob/master/psf/proposals-thoughts.md
After implementing aroberge/friendly#13, adapt it so that something similar can be done from AvantPy.
Features:
Describe the feature you'd like to see added.
For people that write Python/pyen code, with a few exceptions, the current simplified tracebacks include the same Python keywords twice in the explanation. It should be possible to detect if Python or pyen is used and, if so, have a different traceback shown. This could be essentially useful if someone wanted to just use the error handling of AvantPy in a "normal" Python environment.
Who would benefit most from this?
This would benefit mostly students learning standard Python and developers who want to make use of AvantPy's error handling in their own project.
This is to be more consistent with Python's normal terminology, and likely make it easier for people browsing the repository to understand what the code is doing. Also, a similar change was seen as necessary for friendly-traceback as the way invocation.py works may break if another program is run with a -m option and it imports AvantPy.
Currently the GUI converter does a one-to-one translation of keywords from one dialect to another.
AvantPy programs can contain a mixture of Python keywords with keywords from a given dialect. This one-to-one conversion leaves the Python keywords unchanged.
Adding a "full conversion" option would mean to do a conversion in two steps:
This would also allow to remove Python keywords from a given script, by requesting a conversion with the same initial and final dialect.
Below, I give some rationale about some choices made for the French dialect.
= = =
Pour plusieurs des mots-clés dans la version française, j'ai choisi d'utiliser un verbe à l'infinitif et de ne pas traduire le mot anglais utilisé par Python, mais plutôt de trouver un verbe qui capturait mieux l'idée à transmettre aux débutants; par exemple, afficher
pour print
, ou demander
pour input
. Je ne suis pas certain mes choix soient nécessairement les meilleurs et je serais intéressé d'entendre vos suggestions.
Les traductions que j'ai faites pour les fameux tracebacks ne sont que des premières ébauches, qui pourront certainement être améliorées.
Vous pouvez ajouter vos commentaires ou suggestions ci-dessous.
As of August 25, 2020, AvantPy is shelved. It depends on another project which is actively developed and whose current version is no longer compatible with AvantPy.
Describe the feature you'd like to see added.
Currently, I create a separate po file for English, which is almost exactly a carbon copy of the text in the original Python files. I thought that this was going to be necessary to do, but it ends up just duplicating the work.
Who would benefit most from this?
People contributing code to AvantPy.
Is this something you would like to contribute
I will take care of this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.