Project

General

Profile

« Previous | Next » 

Revision 341

util.py: Added type_name()

View differences:

lib/util.py
1 1
# Useful functions and classes
2 2

  
3
def type_name(value): return type(value).__name__
4

  
3 5
def module(value): return type(value).__module__.split('.')
4 6

  
5 7
def root_module(value): return module(value)[0]

Also available in: Unified diff