Code Monkey home page Code Monkey logo

Comments (4)

berkerpeksag avatar berkerpeksag commented on July 18, 2024 1

Thanks for the report. I think that would be a good feature, but the tricky part is that we need to keep in mind different Python versions when doing validation. For example, wrapping int with ast.Num might be the correct solution for Python 3.x and 3.x+1. However, Python 3.x+2 might need ast.Number or ast.Guido in the future.

from astor.

pmaupin avatar pmaupin commented on July 18, 2024

In general, I'm not a big fan of slowing down the general case for exceptions.

I would support your proposal turned inside out; e.g. we wrap the top functions with try/except Exception , and if an exception occurs, we transfer control to a function that tries to do a better job of explaining to the caller what went wrong (e.g. re-raise a different exception).

from astor.

leonardt avatar leonardt commented on July 18, 2024

@pmaupin Interesting point of view! Makes sense to me and does seem like a better approach.

from astor.

pmaupin avatar pmaupin commented on July 18, 2024

Also, I don't have any time right now, but if someone is looking at this, we should probably merge my current PRs (or not) first...

from astor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.