Re: parser option handling
Bernhard Fischer <[email protected]> Tue, 8 May 2007 17:35:01 +0200
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
On Sun, May 06, 2007 at 07:48:49AM -0400, Stefan Seefeld wrote:
>Bernhard Fischer wrote:
>
>>>> AttributeError: 'str' object has no attribute 'append'
>>> That's an interesting error. It is caused by you passing 'cppflags'
>>> explicitely (as a string), and then adding to it (where it is assumed
>>> cppflags is a list). I have to think about how to prevent that. I guess
>>> such mixed usage of both 'cppflags' as well as '-D' etc. is rather uncommon.
>>
>> if type(cppflags) is not ListType:
>> error('cppflags is not a list\n')
>
>I don't think that's very useful either, as users wouldn't be able to
>connect that information back to their use of the synopsis applet.
>May be "please don't use both 'cppflags' as well as '-D'" or something
>like that ?
Yes, or maybe save the given cppflags away, make a list out of it and
proceed. Sounds like overkill, though, so your '-D, -U,.. are mutually
exclusive wrt cppflags' message is fine.
cheers,