On Fri, May 03, 2019 at 10:48:27PM -0400, Martin Blais wrote: > On Thu, May 2, 2019 at 4:26 AM Florian Lindner <mailingli...@xgm.de> wrote: > > Just omitting the optional arguments doesn't work and gives a TypeError. > > > > Python Namedtyples don't come with defaults in their constructor. > I've been meaning to add this eventually - by inheriting and providing such > a constructor. > It could make the entire codebase a little simpler and less error-prone, > it's a bit annoying to always use the full set of positional arguments. > The tags and links empty sets could be handled there automatically as well.
Python data classes might come in handy here: https://docs.python.org/3/library/dataclasses.html -- Stefano Zacchiroli . z...@upsilon.cc . upsilon.cc/zack . . o . . . o . o Computer Science Professor . CTO Software Heritage . . . . . o . . . o o Former Debian Project Leader & OSI Board Director . . . o o o . . . o . « the first rule of tautology club is the first rule of tautology club » -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscr...@googlegroups.com. To post to this group, send email to beancount@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20190504070007.zvhdj2w4zqixixjb%40upsilon.cc. For more options, visit https://groups.google.com/d/optout.