I am compiling linux kernel 3.0.1

My operating system is Ubuntu 11.04

The source is in /usr/src/linux-3.0.1

Though there is no free space remain in / the compilation is still going on .. !

What is happening exactly ?? Should I stop it ? 


Question: Mixed number fractions class
Answer: 1. Bugs

Your doctests do not pass:

$ python3.3 -mdoctest cr35274.py
**********************************************************************
File "./cr35274.py", line 76, in cr35274.Mixed.__new__
Failed example:
    Mixed(Mixed(-1,1,2), Mixed(0,1,2), Mixed(0,1,2))
Expected:
    Mixed(-2, 1, 2)
    Note: The above call is similar to:
Got:
    Mixed(-2, 1, 2)
**********************************************************************
File "./cr35274.py", line 97, in cr35274.Mixed.__new__
Failed example:
    Mixed('-47e-2')
Expected:
    Mixed(0, -47, 100)
Got:
    Mixed(0, 47, 100)
**********************************************************************
1 items had failures:
   2 of  14 in cr35274.Mixed.__new__
***Test Failed*** 2 failures.


2. Commentary

As far as I can see, there are really only two things that you are trying to achieve:


To create the mixed fraction a b/c from the string "a b/c". But instead of implementing a whole new class, why not just write a function to parse the string and return a Fraction?

import re
from fractions import Fraction

_MIXED_FORMAT = re.compile(r"""
    \A\s*                      # optional whitespace at the start, then
    (?P&lt;sign&gt;[-+]?)            # an optional sign, then
    (?P&lt;whole&gt;\d+)             # integer part
    \s+                        # whitespace
    (?P&lt;num&gt;\d+)               # numerator
    /(?P&lt;denom&gt;\d+)            # denominator
    \s*\Z                      # and optional whitespace to finish
""", re.VERBOSE)

def mixed(s):
    """Parse the string s as a (possibly mixed) fraction.

        &gt;&gt;&gt; mixed('1 2/3')
        Fraction(5, 3)
        &gt;&gt;&gt; mixed(' -1 2/3 ')
        Fraction(-5, 3)
        &gt;&gt;&gt; mixed('-0  12/15')
        Fraction(-4, 5)
        &gt;&gt;&gt; mixed('+45/15')
        Fraction(3, 1)

    """
    m = _MIXED_FORMAT.match(s)
    if not m:
        return Fraction(s)
    d = m.groupdict()
    result = int(d['whole']) + Fraction(int(d['num']), int(d['denom']))
    if d['sign'] == '-':
        return -result
    else:
        return result

To format a fraction in mixed notation. But why not just write this as a function:

def format_mixed(f):
    """Format the fraction f as a (possibly) mixed fraction.

        &gt;&gt;&gt; all(format_mixed(mixed(f)) == f for f in ['1 2/3', '-3 4/5', '7/8'])
        True

    """
    if abs(f) &lt;= 1 or f.denominator == 1:
        return str(f)
    return '{0} {1.numerator}/{1.denominator}'.format(int(f), abs(f - int(f)))



The rest of your code seems unnecessary and complicated.