Giter VIP home page Giter VIP logo

Comments (3)

jayvdb avatar jayvdb commented on May 28, 2024

c.f. #73 for str.format which might be easier to build first.

from py2many.

adsharma avatar adsharma commented on May 28, 2024

test case:

if __name__ == '__main__':
    a = 10
    print(f"hello world: {a} number")

AST looks like this:

                           JoinedStr(
                                lineno=3,
                                col_offset=10,
                                end_lineno=3,
                                end_col_offset=36,
                                values=[
                                    Constant(lineno=3, col_offset=10, end_lineno=3, end_col_offset=36, value='hello world: ', kind=None),
                                    FormattedValue(
                                        lineno=3,
                                        col_offset=10,
                                        end_lineno=3,
                                        end_col_offset=36,
                                        value=Name(lineno=3, col_offset=26, end_lineno=3, end_col_offset=27, id='a', ctx=Load()),
                                        conversion=-1,
                                        format_spec=None,
                                    ),
                                    Constant(lineno=3, col_offset=10, end_lineno=3, end_col_offset=36, value=' number', kind=None),

I'll prioritize this tomorrow.

from py2many.

jayvdb avatar jayvdb commented on May 28, 2024

Awesome. If we can get this fixed, we can transpile py2many/pyrs itself into Rust - it wont compile, but adding transpiling of py2many as a test case (I have this roughly coded already) will add a lot more coverage preventing exceptions during transpilation.

from py2many.

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.