Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

.NET enums should not be automatically converted to Python int and back #1220

Closed
Milestone
@lostmsu

Description

@lostmsu

From#1179

In Python, it should be possible to refer to enum members:MyEnum.Member, and to create arbitrary enum values fromint explicitly like this:MyEnum(42). But by default a number and a value of some enum should not be freely convertible to each other. E.g. this should fail:

voidMethod(MyEnumvalue)=> ...;

Python:

Method(42);# <- this should be a TypeError

We can add a generic enum codec, that could be enabled on demand to restore old behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp