MSV FM

[email protected]: ~ $
Path : /usr/lib64/python2.7/lib2to3/fixes/
File Upload :
Current < : //usr/lib64/python2.7/lib2to3/fixes/fix_metaclass.pyo

�
{fc@s�dZddlmZddlmZddlmZmZmZm	Z	d�Z
d�Zd�Zd�Z
d	�Zd
�Zdejfd��YZd
S(s�Fixer for __metaclass__ = X -> (metaclass=X) methods.

   The various forms of classef (inherits nothing, inherits once, inherints
   many) don't parse the same in the CST so we look at ALL classes for
   a __metaclass__ and if we find one normalize the inherits to all be
   an arglist.

   For one-liner classes ('class X: pass') there is no indent/dedent so
   we normalize those into having a suite.

   Moving the __metaclass__ into the classdef can also cause the class
   body to be empty so there is some special casing for that as well.

   This fixer also tries very hard to keep original indenting and spacing
   in all those corner cases.

i(t
fixer_base(ttoken(tNametsymstNodetLeafcCs�x�|jD]�}|jtjkr,t|�S|jtjkr
|jr
|jd}|jtjkr�|jr�|jd}t|t�r�|j	dkr�t
Sq�q
q
WtS(s� we have to check the cls_node without changing it.
        There are two possibilities:
          1)  clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta')
          2)  clsdef => simple_stmt => expr_stmt => Leaf('__meta')
    it
__metaclass__(tchildrenttypeRtsuitet
has_metaclasstsimple_stmtt	expr_stmtt
isinstanceRtvaluetTruetFalse(tparenttnodet	expr_nodet	left_side((s3/usr/lib64/python2.7/lib2to3/fixes/fix_metaclass.pyR
s


cCs�x'|jD]}|jtjkr
dSq
Wx?t|j�D]"\}}|jtjkr:Pq:q:Wtd��ttjg�}xC|j|dr�|j|d}|j	|j
��|j�q�W|j	|�|}dS(sf one-line classes don't get a suite in the parse tree so we add
        one to normalize the tree
    NsNo class suite and no ':'!i(RRRR	t	enumerateRtCOLONt
ValueErrorRtappend_childtclonetremove(tcls_nodeRtiR	t	move_node((s3/usr/lib64/python2.7/lib2to3/fixes/fix_metaclass.pytfixup_parse_tree-s
c
Cs�x7t|j�D]"\}}|jtjkrPqqWdS|j�ttjg�}ttj	|g�}x;|j|r�|j|}|j
|j��|j�qnW|j||�|jdjd}|jdjd}	|	j
|_
dS(s� if there is a semi-colon all the parts count as part of the same
        simple_stmt.  We just want the __metaclass__ part so we move
        everything after the semi-colon into its own simple_stmt node
    Ni(RRRRtSEMIRRRRRRRtinsert_childtprefix(
RRt	stmt_nodetsemi_indRtnew_exprtnew_stmtRt	new_leaf1t	old_leaf1((s3/usr/lib64/python2.7/lib2to3/fixes/fix_metaclass.pytfixup_simple_stmtGs

cCs:|jr6|jdjtjkr6|jdj�ndS(Ni����(RRRtNEWLINER(R((s3/usr/lib64/python2.7/lib2to3/fixes/fix_metaclass.pytremove_trailing_newline_s"ccs�x3|jD]}|jtjkr
Pq
q
Wtd��x�tt|j��D]�\}}|jtjkrL|jrL|jd}|jtjkr�|jr�|jd}t	|t
�r�|jdkr�t|||�t
|�|||fVq�q�qLqLWdS(NsNo class suite!iu
__metaclass__(RRRR	RtlistRRRR
RRR(R*(RRRtsimple_nodeRt	left_node((s3/usr/lib64/python2.7/lib2to3/fixes/fix_metaclass.pyt
find_metasds"


cCs�|jddd�}x,|rD|j�}|jtjkrPqqWxm|r�|j�}t|t�r�|jtjkr�|jr�d|_ndS|j	|jddd��qHWdS(s� If an INDENT is followed by a thing with a prefix then nuke the prefix
        Otherwise we get in trouble when removing __metaclass__ at suite start
    Ni����u(
RtpopRRtINDENTR
RtDEDENTR!textend(R	tkidsR((s3/usr/lib64/python2.7/lib2to3/fixes/fix_metaclass.pytfixup_indent{s		!	tFixMetaclasscBseZeZdZd�ZRS(s
    classdef<any*>
    cCst|�sdSt|�d}x-t|�D]\}}}|}|j�q-W|jdj}t|j�dkr�|jdjtj	kr�|jd}q�|jdj
�}	ttj	|	g�}|jd|�n�t|j�dkrttj	g�}|j
d|�n~t|j�dkr�ttj	g�}|j
dttjd��|j
d|�|j
dttjd��ntd	��|jdjd}
d
|
_|
j}|jr�|jttjd��d|
_n	d
|
_|jd}d
|jd_d
|jd_|j|�t|�|js�|j�t|d�}
||
_|j|
�|jttjd��n�t|j�dkr|jdjtjkr|jdjtjkrt|d�}
|j
d|
�|j
dttjd��ndS(Niiiiiiu)u(sUnexpected class definitiont	metaclassu,u uiupassu
i����i����(R
RtNoneR.RRRtlenRtarglistRRt	set_childR RRtRPARtLPARRRR!RtCOMMAR4R)R0R1(tselfRtresultstlast_metaclassR	Rtstmtt	text_typeR9Rtmeta_txttorig_meta_prefixRt	pass_leaf((s3/usr/lib64/python2.7/lib2to3/fixes/fix_metaclass.pyt	transform�s^
				


	
	
(t__name__t
__module__Rt
BM_compatibletPATTERNRF(((s3/usr/lib64/python2.7/lib2to3/fixes/fix_metaclass.pyR5�sN(t__doc__tRtpygramRt
fixer_utilRRRRR
RR(R*R.R4tBaseFixR5(((s3/usr/lib64/python2.7/lib2to3/fixes/fix_metaclass.pyt<module>s"						
Bethany
Bethany
0%

THE FINEST HOTEL NEAR LAKE KIVU

The Perfect Base For You

Required fields are followed by *





EC1A68011

About Us

Delicious Interior With The Pinch Of Everything

Bethany Investment group is Presbyterian church in Rwanda(EPR) company that manage Hotel and Guest house in Karongi (Bethany Hotel), ISANO branch in GIKONDO(Kigali), Kiyovu branch(Kigali), AMIZERO branch(Nyagatare-East) and Gisenyi Branch(Rubavu).

Accomodation

Get a Comfortable Room
Feel The Comfort

Get a comfortable room and feel our hotel’s comfort. Bethany Hotel features a variety of fully furnished rooms with extra space, Executive rooms, Deluxe rooms with a beautiful lake view and garden space, Deluxe rooms, comfort rooms, family rooms and standard rooms at your service.

Standard Single

Services

We Provide Top Class Facility
Especially For You

Beach BBQ Party

Kick back on the beach& and enjoy our berbecue from our masterchef

Breakfast

Kick back at our hotels& enjoy our breakfast from our masterchef

Conference Hall

Kick back at our hotels& enjoy our conference halls from all bethany branches

Enjoy with your partner

Honeymoon Package

80%

Get In Touch

Don’t Miss Any Update

    +

    Search your Room

    Required fields are followed by *