Tullio Facchinetti
Tag cloud
Picture wall
Daily
RSS Feed
  • RSS Feed
  • ATOM Feed
  • Daily Feed
Filters

Links per page

  • 20 links
  • 50 links
  • 100 links

Display

Filter untagged links
C-like structures in Python https://stackoverflow.com/questions/35988/c-like-structures-in-python
Wed 07 Aug 2019 07:32:02 AM CEST
QRCode

Is there a way to conveniently define a C-like structure in Python? I'm tired of writing stuff like:

class MyStruct():
    def __init__(self, field1, field2, field3):
        self.field1 = field1
        self.field2 = field2
        self.field3 = field3
c guidelines programming python stackoverflow
3660 links
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Theme by kalvn