How to define custom properties in enumeration in Python (Javascript-like) : <p>In JavaScript we can do this:</p>

<pre><code>var Color = {
    YELLOW: { value: 1, displayString: "Yellow" },
    GREEN: { value: 2, displayString: "Green" },
}
</code></pre>

<p>So I can call:</p>

<pre><code>Color.YELLOW.displayString
</code></pre>

<p>In Java we can do this:</p>

<pre><code>public enum Color {

    YELLOW (1, "Yellow"),
    GREEN (2, "Green"),

    private Color(String value, int displayString){
        this.value = value;
        this.displayString = displayString;
    }

    private final int value;
    private final String displayString;

    public String getValue() {return value;}
    public String getDisplayString() {return displayString;}
}
</code></pre>

<p>So I can call:</p>

<pre><code>Color.YELLOW.getDisplayString()
</code></pre>

<p>After much research I haven't found a clean way to do this in Python using the built-in Enum module. How can I do this?</p>

<p>Thanks</p>
