amarao (amarao_san) wrote,
amarao
amarao_san

python struct

Я очень сильно тупил со структурами...

Итак, быстрый метод иметь удобные структуры в питоне:

Class data_t():
    pass


variable=data_t()
variable.first=3
variable.second=232
variable.third="sdf"
variable.myarray=[3,4.6]
...
return variable


....

v=func()
print v.fist

и т.д.
Tags: python
Subscribe

  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 7 comments