environment/lib/python2.7/site-packages/IPython/core/debugger.py
def checkline(self, filename, lineno):
        """Check whether specified line seems to be executable.

        Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank
        line or EOF). Warning: testing is not comprehensive.
        """
        #######################################################################
        # XXX Hack!  Use python-2.5 compatible code for this call, because with
        # all of our changes, we've drifted from the pdb api in 2.6.  For now,
        # changing:
        #
        #line = linecache.getline(filename, lineno, self.curframe.f_globals)
        # to:
        #
        line = linecache.getline(filename, lineno)
        #
        # does the trick.  But in reality, we need to fix this by reconciling
        # our updates with the new Pdb APIs in Python 2.6.
        #
        # End hack.  The rest of this method is copied verbatim from 2.6 pdb.py
        #######################################################################

        if not line:
            print >>self.stdout, 'End of file'
            return 0
        line = line.strip()
        # Don't allow setting breakpoint at a blank line
        if (not line or (line[0] == '#') or
             (line[:3] == '"""') or line[:3] == "'''"):
            print >>self.stdout, '*** Blank or comment'
            return 0
        return lineno
def checkline(self, filename, lineno):
        """Check whether specified line seems to be executable.

        Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank
        line or EOF). Warning: testing is not comprehensive.
        """
        #######################################################################
        # XXX Hack!  Use python-2.5 compatible code for this call, because with
        # all of our changes, we've drifted from the pdb api in 2.6.  For now,
        # changing:
        #
        #line = linecache.getline(filename, lineno, self.curframe.f_globals)
        # to:
        #
        line = linecache.getline(filename, lineno)
        #
        # does the trick.  But in reality, we need to fix this by reconciling
        # our updates with the new Pdb APIs in Python 2.6.
        #
        # End hack.  The rest of this method is copied verbatim from 2.6 pdb.py
        #######################################################################

        if not line:
            print >>self.stdout, 'End of file'
            return 0
        line = line.strip()
        # Don't allow setting breakpoint at a blank line
        if (not line or (line[0] == '#') or
             (line[:3] == '"""') or line[:3] == "'''"):
            print >>self.stdout, '*** Blank or comment'
            return 0
        return lineno
Check whether specified line seems to be executable.

        Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank
        line or EOF). Warning: testing is not comprehensive.