Vyper: SyntaxError on struct definition

Created on 9 Dec 2018  路  4Comments  路  Source: vyperlang/vyper

Version Information

  • vyper Version: 0.1.0b5, 0.1.0b4, 0.1.0b3, 0.1.0b2

What's your issue about?

SyntaxError thrown on struct definition.

struct MyStruct:
    value1: int128
    value2: decimal

results in:

    struct MyStruct:
                  ^
SyntaxError: invalid syntax

This example is taken directly from the documentation: https://vyper.readthedocs.io/en/latest/types.html#structs

Tried downgrading versions up until b2, but no effect.

Same issue with https://vyper.online/ ("Voting" example)

Most helpful comment

@alexeiZamyatin please try the beta-5 docs, I will keep docs set to the latest version (instead of master / latest) at all times from now on.

All 4 comments

Looks like docs were updated before we made this release. Our apologies! Check out https://vyper.readthedocs.io/en/v0.1.0-beta.3/ for the old way to use structs (which is not nearly as expressive)

Otherwise, if you wait a bit we will have the new version out!

This feature will be added within the week I think, right @jacqueswww? P.S. looks like we don't have an automatic tag for RTD for our documentation? (e.g. there is no b4/b5 tags available)

Not a problem, will build the docs ;)

@alexeiZamyatin please try the beta-5 docs, I will keep docs set to the latest version (instead of master / latest) at all times from now on.

Closing as we have the matched docs up on read the docs now.

Was this page helpful?
0 / 5 - 0 ratings