Changes between Initial Version and Version 2 of Ticket #23238


Ignore:
Timestamp:
06/14/17 12:09:21 (4 years ago)
Author:
jdemeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23238

    • Property Cc andrew.mathas tscrim added
  • Ticket #23238 – Description

    initial v2  
    11Rethink the syntax of `GlobalOptions`. This is mainly meant to address the problem that the `doc` and `end_doc` attributes of a `GlobalOptions` object are not doctested (see #16693 and #18051 which were closed as duplicate of #14272 but which would better be fixed independently).
     2
     3I am thinking of replacing
     4{{{
     5options = GlobalOptions('menu',
     6    doc='Fancy documentation\n'+'-'*19, end_doc='The END!',
     7    entree=dict(...), ...)
     8}}}
     9by
     10{{{
     11class options(GlobalOptions):
     12    """
     13    Fancy documentation
     14    -------------------
     15
     16    @OPTIONS@
     17
     18    The END!
     19    """
     20    name = "menu"
     21    entree=dict(...)
     22}}}
     23
     24In other words, to use the `class` statement essentially as a namespace.