[BangPypers] UML <=> Python...and other things...
vsapre80 at gmail.com
Tue Mar 31 12:14:26 CEST 2009
Something on these lines would have to be done:
>>> d = obj.__doc__
'\n This class encapsulates all methods for doing\n whatever you would
like to do\n with it\n'
>>> d2 = d.split('\n')
' This class encapsulates all methods for doing',
' whatever you would like to do',
' with it',
>>> import string
>>> d4 = map(string.strip, d2)
'This class encapsulates all methods for doing',
'whatever you would like to do',
'']>>> print '\n'.join(d4)
This class encapsulates all methods for doing
whatever you would like to do
On Tue, Mar 31, 2009 at 3:19 PM, Vishal <vsapre80 at gmail.com> wrote:
> Hi Bruno,
> Thanks for the email. The only reason I had not put a remark on BOUML
> trackers forum was that I was not using BOUML heavily.
> I think while creating code, the indentation should certainly be there.
> Usually when ever I introspect about __doc__ from a python class/function,
> I dont see the indentation in that...but that might be because my IDE takes
> care of removing
> the indentation.
> So to answer your question, when introspecting code, can you make it such
> that a query for __doc__ removes indentation (left side space gets trimmed
> for each line) from the block that is returned?
> Thanks and best regards,
> Vishal Sapre
> p.s: Just wanted to congratulate you on a wonderful piece of software
> (BOUML) that you have been doing for so long.
> On Tue, Mar 31, 2009 at 1:38 PM, bruno pages <bouml at free.fr> wrote:
>> Vishal-7 wrote:
>> > BOUML works wonderfully, except the default indentation of docstrings.
>> I am the author of Bouml, I never receive a remark from you or other
>> user on Bouml forums/trackers about that
>> Yes the Python generator doesn't indent docstring because If I do that the
>> string returned by __doc__ contains these indentations, and I supposed
>> is not the expected behavior
>> But I am not a Python programmer (sorry), can you confirm the docstring
>> be indented even this pollutes __doc__ ?
>> Thanks and best regards,
>> View this message in context:
>> Sent from the BangPypers - Bangalore Python Users Group mailing list
>> archive at Nabble.com.
>> BangPypers mailing list
>> BangPypers at python.org
> "So say...Day by day, in every way, I am getting better, better and better
> "A Strong and Positive attitude creates more miracles than anything else.
> Because...Life is 10% how you make it, and 90% how you take it"
> "Diamond is another piece of coal that did well under pressure”
> "Happiness keeps u Sweet, Trials keep u Strong,
> Sorrow keeps u Human, Failure Keeps u Humble,
> Success keeps u Glowing, But only God Keeps u Going.....Keep Going....."
"So say...Day by day, in every way, I am getting better, better and better
"A Strong and Positive attitude creates more miracles than anything else.
Because...Life is 10% how you make it, and 90% how you take it"
"Diamond is another piece of coal that did well under pressure”
"Happiness keeps u Sweet, Trials keep u Strong,
Sorrow keeps u Human, Failure Keeps u Humble,
Success keeps u Glowing, But only God Keeps u Going.....Keep Going....."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the BangPypers