Skip to content

Commit

Permalink
Update compiler/cpp/src/thrift/generate/t_py_generator.cc
Browse files Browse the repository at this point in the history
Co-authored-by: Yuxuan 'fishy' Wang <fishywang@gmail.com>
  • Loading branch information
KTAtkinson and fishy committed Jul 7, 2023
1 parent beeaf6c commit 23e94f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/cpp/src/thrift/generate/t_py_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -897,8 +897,8 @@ void t_py_generator::generate_py_struct_definition(ostream& out,
indent_up();

// Not user-provided fields should be editable so that the Python Standard Library can edit
// internal fields of std library base classes. For example, in Python 3.11 context managers
// edit the `__traceback__` field on Exceptions. Allowing this to work with `__slots__` is
// internal fields of std library base classes. For example, in Python 3.11 ContextManager
// edits the `__traceback__` field on Exceptions. Allowing this to work with `__slots__` is
// trivial because we know which fields are user-provided, without slots we need to build a
// way to know which fields are user-provided.
if (gen_slots_ && !gen_dynamic_) {
Expand Down

0 comments on commit 23e94f8

Please sign in to comment.