roshanjrajan-zip commented on PR #2824:
URL: https://github.com/apache/thrift/pull/2824#issuecomment-1613749692

   > I see. So this is only about the "constructor", but the actual constructor 
doesn't do anything special and just stores the args, and all the special logic 
happens in other functions using the stored args.
   > 
   > I think it would make more sense to actually move the logic to constructor 
instead, e.g. convert either string or actual enum to the actual enum, so we 
don't have to do the same check everywhere else.
   
   The issue is that people can construct the struct and then 
serialize/deserialize the struct later. I'm fine with your suggestion but it 
could potentially be breaking behavior.
   ```python
   struct = TestStruct(param1="test_string")
   struct.param2="TestEnum1"
   # serialize/deserialize logic ...
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to