1# Copyright (c) 2006-2009 Nathan Binkert <nate@binkert.org> 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 265 unchanged lines hidden (view full) --- 274 (lineno, colno)) 275 276 d = code_formatter.pattern.sub(convert, format) 277 self._append(d) 278 279__all__ = [ "code_formatter" ] 280 281if __name__ == '__main__': |
282 from .code_formatter import code_formatter |
283 f = code_formatter() 284 285 class Foo(dict): 286 def __init__(self, **kwargs): 287 self.update(kwargs) 288 def __getattr__(self, attr): 289 return self[attr] 290 --- 31 unchanged lines hidden --- |