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

case下のclassから親classの属性を読めるようにする #8

Open
youzaka opened this issue Feb 3, 2013 · 0 comments
Open

Comments

@youzaka
Copy link
Owner

youzaka commented Feb 3, 2013

    @case(lambda self: self.logo_transmission_type == x03)
    class type_03(Syntax):
        logo_char = aribstr(lambda self: self.descriptor_length - 1)

親のdescriptor_length が読めないのでエラーになる。
caseの場合には呼び出し元の参照を渡して、AttributeErrorだったら上を見るみたいな実装になるかも

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

No branches or pull requests

1 participant