Stefan Krah added the comment:

Here's a proposal for an alternative without parameter docstrings and a
different DSL (see os_stat.c). I guess it's easiest to present my thoughts
in list form.


Changes and rationale:
======================

  Split docstring into function header and rest
  ---------------------------------------------

    - Since the docstrings aren't repeated, less vertical space is used.

    - The main part of the docstring can go into a header file.

    - It's (IMO) easier to compare the generated header (see OS_STAT_HEADER)
      to the specification in the comment.


  More formal DSL
  ---------------

    This is my personal opinion: The existing DSL is fine for a configuration
    file (think .hgrc), but I have trouble with it in the context of a C file.

    Most importantly, I'm unable to take in the required information at a
    single glance.

    So I propose to make the structure of the specification explicit. For
    me the result is more readable. Also, it's already pretty close to a formal
    grammar and can be optionally condensed into single lines.

  Logical grouping
  ----------------

    The preprocessor comment, OS_STAT_HEADER and the os_stat() definition are
    close together and fit on a single screen.

----------
Added file: http://bugs.python.org/file29059/os_stat.c

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16612>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to