gpt4 book ai didi

python - 使用文档字符串记录 Pythons @property "attributes"

转载 作者:太空宇宙 更新时间:2023-11-04 03:46:58 25 4
gpt4 key购买 nike

<分区>

我认为文档字符串更多的是个人偏好,但我想听听一些比我聪明的人的意见......

这是记录 get/set nature pythons @property 描述符属性的合法方式吗?

class Handle(rgm.RigModule):
'''
Handle nodes are intended to be keyable transforms, made viewable by shape nodes connected as children

@Properties:

parent:
Transform: Returns Transform instance if parent exists, otherwise None
parent.setter:
(str): Sets parent transform. (Accepts string name of transform, or any instance of the Transform class)

shape:
str: returns string representation of current shape
shape.setter:
(str): sets current shape using string representation provided. If string key does not exist in library, shape will be set to None

shapeDraw:
dict: returns dictionary of shape data
shapeDraw.setter:
(dict): sets current shapes using data

shapeColor:
int: returns integer representation of current shape color
shapeColor.setter:
(int): sets current shape color using integer provided.

shapeColor:
int: returns integer representation of current shape color
shapeColor.setter:
(int): sets current shape color using integer provided.

shapeTranslate:
list: returns a 3list of the shape nodes relative offset translation
shapeTranslate.setter:
(list): sets relative offset translation of the shape nodes

shapeRotate:
list: returns a 3list of the shape nodes relative offset rotation
shapeRotate.setter:
(list): sets relative offset rotation of the shape nodes

shapeScale:
list: returns a 3list of the shape nodes relative offset scale
shapeScale.setter:
(list): sets relative offset scale of the shape nodes

shapeMatrix:
list: returns a 8list of the shape nodes relative offset matrix
shapeMatrix.setter:
(list): sets relative offset matrix of the shape nodes

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com