wang-xinhong / protobuf

Automatically exported from code.google.com/p/protobuf
Other
0 stars 0 forks source link

Python: possible to set invalid enum value #206

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It's currently possible to set an enum field to an invalid value. I think it 
should throw ValueError instead.

https://code.google.com/apis/protocolbuffers/docs/reference/python-generated.htm
l#enum
mentions that "A future version of the library may explicitly disallow this."

Original issue reported on code.google.com by ivan.kozik@gmail.com on 19 Jul 2010 at 9:33

GoogleCodeExporter commented 9 years ago
Petar, I believe you were already planning to address this?  Or did we decide 
that this change would break too many people?

Original comment by kenton@google.com on 20 Jul 2010 at 9:53