Mercurial > lcfOS
view python/ppci/common.py @ 166:da0087b82fbe
Improved type checking
author | Windel Bouwman |
---|---|
date | Fri, 22 Mar 2013 16:15:31 +0100 |
parents | 8104fc8b5e90 |
children | 6b2bec5653f1 |
line wrap: on
line source
from collections import namedtuple #SourceLocation = namedtuple('SourceLocation', ['row', 'col']) class SourceLocation: def __init__(self, row, col, ln): self.row = row self.col = col self.length = ln SourceRange = namedtuple('SourceRange', ['p1', 'p2'])