The code formatting of assignments and double-slash comments is not aligned
// Python4Delphi Demo
function PyPoint_getattr(obj: PPyObject; Key: PAnsiChar): PPyObject; cdecl;
begin
with GetPythonEngine, PPyPoint(obj)^ do begin
if Key = 'x' then
Result :=
PyLong_FromLong(po_x)
// code format error!
else if Key = 'y' then
Result := PyLong_FromLong(po_y)
else if Key = 'z' then
Result := PyLong_FromLong(po_z)
else begin
Result := PyObject_GenericGetAttr(obj, PyUnicodeFromString(Key));
if not Assigned(Result) then
PyErr_SetString(PyExc_AttributeError^, PAnsiChar(Utf8Encode(Format('Unknown attribute "%s"', [Key]))));
end;
end;
end;