<div dir="auto">I suspect because properties were not yet “cool” when Lisandro designed the attribute system. </div><div dir="auto"><br></div><div dir="auto">Numpy’s design similarly also predate a lot of the property semantics in the higher abstraction interfaces of Python. </div><div dir="auto"><br></div><div dir="auto">We attempted some of these tricks with pyclaw and I think regretted at least some of them. </div><div dir="auto"><br></div><div dir="auto">Aron</div><div dir="auto"><br></div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 6, 2023 at 9:19 PM Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><br>
  How come petsc4py has the (nonstandard?) v.setAttr('name',value) and v.getAttr('name') instead of <a href="http://v.name" rel="noreferrer" target="_blank">v.name</a> notation? Could they be refactored to have "normal" attribute behavior? If not, could a v.hasAttr('name') be added? <br>
<br>
  Similarly, how come numpy arrays seem to have no way to set attributes on them? <br>
<br>
  PyTorch tensors seem to support the standard <a href="http://t.name" rel="noreferrer" target="_blank">t.name</a> handling of attributes.<br>
<br>
   Thanks </blockquote></div></div>