On Jun 26, 2007, at 2:57 PM, Uwe Grauer wrote:

> Even though i don't care, i have a question about this decision:
> Is there a utility which is able to convert a python source file to  
> tabs
> only indentation?

        I doubt it, since spaces by their very nature are ambiguous. If a  
line is indented 12 spaces, how many tabs should it be converted to?

        Also, you could indent one file (or even one function of a file)  
with 2 spaces per indent, and another with 3, and another with 4.

        However, if you know that there are 'n' spaces per indent level, and  
that this never changes, the code would be pretty straightforward:  
just grab the leading spaces, and replace them with the corresponding  
tabs.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to