U .Ѫ_@sFdZddlZejddkrejZeZeZ ddZ ddZ ddZ ddZ d dZd dZd dZd d ZddZddZeZddZnejddddgkr ejZeefZeZ eZ ddZ ddZ ddZ ddZddZddZdd ZddZddZeZddZnedzdd lmZWnek r@ddl ZYnXdS)!z Compatibility wrappers providing uniform behaviour for Python code required to run under both Python 2.x and 3.x. All operations emulate 2.x behaviour where applicable. NcCs t|dS)NzUTF-8)bytesxr5/Users/cjl/code/aws-vpc-ipam/lambda/netaddr/compat.pyrcCst|ttdfSN) isinstancestrtypeencoderrrrrr cCs t|tSN)r intrrrrrr cCs t|dS)N__call__)hasattrrrrrrr cCs t|Sr)listkeysrrrrrr cCs t|Sr)ritemsrrrrr r cCs|Srrrrrrr"r cGsdj|Sr )rjoinargsrrr _bytes_join$srcGs tt|Sr)rziprrrr_zip'srcOstt||Sr)rrangerkwargsrrr_range*sr!cCst|Srnextrrrr _iter_next/sr$cCs t|tSr)r basestringrrrrr<r cCst|ttfSr)r rlongrrrrr>r cCst|Sr)callablerrrrr@r cCs|SrrrrrrrBr cCs|Sr)rrrrrrDr cCs t|Sr)iterrrrrrrFr cGs dj|Sr )rrrrrrHscGst|Sr)rrrrrrKscOs t||Sr)rrrrrr!NscCs|Srr"rrrrr$SszAthis module only supports Python 2.4.x or higher (including 3.x)!) resources)!__doc__sys_sys version_infomaxsizeZ _sys_maxintrZ _int_typer Z _str_typeZ _bytes_typeZ_is_strZ_is_int _callableZ _dict_keysZ _dict_items_iter_dict_keysrrr!rZ _iter_ranger$Zmaxintr'r&xrange RuntimeError importlibr*Z_importlib_resources ImportErrorZimportlib_resourcesrrrrsP