Add default to offset param of Python generated GetRootAs (#6312)

This commit is contained in:
Richard A Hofer
2020-12-07 14:34:07 -05:00
committed by GitHub
parent f437f0f7ed
commit fc960f3670

View File

@@ -127,7 +127,7 @@ class PythonGenerator : public BaseGenerator {
code += Indent + "@classmethod\n";
code += Indent + "def GetRootAs";
code += NormalizedName(struct_def);
code += "(cls, buf, offset):";
code += "(cls, buf, offset=0):";
code += "\n";
code += Indent + Indent;
code += "n = flatbuffers.encode.Get";