Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyScript glitches #332

Closed
almarklein opened this issue Jan 3, 2017 · 3 comments
Closed

PyScript glitches #332

almarklein opened this issue Jan 3, 2017 · 3 comments

Comments

@almarklein
Copy link
Member

almarklein commented Jan 3, 2017

This is an issue to collect "glitches" in PyScript, because it's so easy to forget about them. We'll have to see whether to fix or document each one individually.

  • if x, with x an object can resolve to False if that object has a length property.
  • IIRC x = x or 0 does not work, since truthy() returns False on a non-truthy and the original object otherwise.
  • elif this_is_js(): produces syntactically invalid JS.
  • using range() brings in the pyfunc_range() even if used in for-loop.
  • assert x does not use truthy()
  • List comprehensions do not work with float arrays PyScript list comprehensions don't work for Float64Array #396
@Winand
Copy link

Winand commented Jul 2, 2017

(as of v0.4.1) pyscript allows def catch(): and this = ... and produces invalid js

@Winand
Copy link

Winand commented Jul 7, 2017

class Translator():
    langs, q = {}, None

produces invalid js source (variables are defined globally):

stub2_ = [{}, null];
langs = stub2_[0];q = stub2_[1];

@almarklein
Copy link
Member Author

Issue moved to flexxui/pscript #7 via ZenHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants