Your IP : 216.73.216.134


Current Path : /opt/rh/rh-python35/root/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/rh/rh-python35/root/lib64/python3.5/__pycache__/typing.cpython-35.pyc



���\��1@s	ddlZddlmZmZddlZddlZddlZddlZddlZyddl	jZ
Wnek
r�ddlZ
YnXddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+g)Zd,d-�Z
Gd.d/�d/e�ZGd0d1�d1�ZGd2d3�d3e�ZGd4d5�d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�ZGd>d?�d?e�ZGd@d�dedAedBdC�ZGdDd�dedAedBdC�ZedE�ZedF�ZedG�ZedHdIdC�ZedJdIdC�ZedKdIdC�ZedLdMdC�Z ed$e!e"�Z#GdNdO�dOe�Z$GdPd�dedAe$dBdC�Z%GdQdR�dRe�Z&GdSd�dedAe&dBdC�Z'GdTdU�dUe�Z(GdVd	�d	edAe(dBdC�Z)GdWdX�dXe�Z*GdYd�dedAe*dBdC�Z+dZd[�Z,d\d]�Z-Gd^d_�d_eej.�Z/Gd`d�ddAe/�Z0dad%�Z1dbdc�Z2ddddd&�Z3ded'�Z4dfd(�Z5dgd)�Z6Gdhdi�die/�Z7Gdjdk�dkdAe7�Z8e
j9Z9Gdld�de0edme
j:�Z:Gdnd�de:edme
j;�Z;Gdod�de8�Z<Gdpd�de8�Z=Gdqdr�dre8�Z>Gdsdt�dte8�Z?Gdud�de8e�Z@Gdvd�de8e�ZAGdwd�de8e�ZBe
jCZCGdxd�de0edme
jD�ZDGdyd
�d
eCe:eeDedme
jE�ZFGdzd�deFedme
jG�ZGGd{d�deCe:eeDee0edme
jH�ZHGd|d�deHeefdme
jI�ZIGd}d�deCe:eeDedme
jJ�ZJGd~d�deJedme
jK�ZKGdd�deJeLdme
jM�ZMeMjNeeOd����Gd�d �d ePeKe�ZQGd�d!�d!eReGe�ZEGd�d��d�e/�ZSGd�d��d�eTeFedAeS�ZUGd�d�deCe:edme
jV�ZVGd�d�deVeeFedme
jW�ZWGd�d�deVe0eefdme
jX�ZXGd�d�deVedme
jY�ZYGd�d�deZeIeef�Z[e\e
d#�r�e
j]Z^n	ej_Z^Gd�d#�d#e;ee0ee efdme^�Z]d�d"�Z`Gd�d��d�e0e#�ZaGd�d��d�eae!�ZbGd�d��d�eae"�ZcGd�d*�d*�Zdeed�ed_eedejfedje<ed�e#eejgd���d�d���Zhed�e#eejid�d���d�d���ZjGd�d+�d+�Zeed�e_eeejfeje<dS)��N)�abstractmethod�abstractproperty�Any�Callable�Generic�Optional�TypeVar�Union�Tuple�AbstractSet�
ByteString�	Container�Hashable�	ItemsView�Iterable�Iterator�KeysView�Mapping�MappingView�MutableMapping�MutableSequence�
MutableSet�Sequence�Sized�
ValuesView�
Reversible�SupportsAbs�
SupportsFloat�SupportsInt�
SupportsRound�Dict�List�Set�
NamedTuple�	Generator�AnyStr�cast�get_type_hints�
no_type_check�no_type_check_decorator�overload�io�recCs+tjdd�dkr |jS|jSdS)N��)r.r.)�sys�version_info�__qualname__�__name__)�x�r4�6/opt/rh/rh-python35/root/usr/lib64/python3.5/typing.py�	_qualnameKsr6csdeZdZdZdZdd�fdd�Zdd�Zdd	�Zd
d�Zdd
�Z	�S)�
TypingMetaa�Metaclass for every type defined below.

    This overrides __new__() to require an extra keyword parameter
    '_root', which serves as a guard against naive subclassing of the
    typing classes.  Any legitimate class defined using a metaclass
    derived from TypingMeta (including internal subclasses created by
    e.g.  Union[X, Y]) must pass _root=True.

    This also defines a dummy constructor (all the work is done in
    __new__) and a nicer repr().
    F�_rootcsG|s.tddjtt|��p'd��t�j||||�S)NzCannot subclass %sz, z())�	TypeError�join�map�
_type_repr�super�__new__)�cls�name�bases�	namespacer8)�	__class__r4r5r>bs"zTypingMeta.__new__cOsdS)Nr4)�self�args�kwdsr4r4r5�__init__hszTypingMeta.__init__cCs|S)a+Override this in subclasses to interpret forward references.

        For example, Union['C'] is internally stored as
        Union[_ForwardRef('C')], which should evaluate to _Union[C],
        where C is an object found in globalns or localns (searching
        localns first, of course).
        r4)rD�globalns�localnsr4r4r5�
_eval_typekszTypingMeta._eval_typecCsdS)NFr4)rDr4r4r5�
_has_type_varuszTypingMeta._has_type_varcCsd|jt|�fS)Nz%s.%s)�
__module__r6)rDr4r4r5�__repr__xszTypingMeta.__repr__)
r2rLr1�__doc__�_is_protocolr>rGrJrKrMr4r4)rCr5r7Ss
r7c@s(eZdZdZfZdd�ZdS)�Finalz&Mix-in class to prevent instantiation.cOstd|j��dS)NzCannot instantiate %r)r9rC)rDrErFr4r4r5r>�sz
Final.__new__N)r2rLr1rN�	__slots__r>r4r4r4r5rP|srPcsXeZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Z�S)�_ForwardRefz$Wrapper to hold a forward reference.cst|t�s"td|f��yt|dd�}Wn%tk
r_td|f��YnXt�j||fidd�}||_||_d|_	d|_
t�}tj
d�}x(|dk	r�|j|kr�|j}q�W|dk	s�t�||_|S)	Nz%ForwardRef must be a string -- got %rz<string>�evalz*ForwardRef must be an expression -- got %rr8TF�)�
isinstance�strr9�compile�SyntaxErrorr=r>�__forward_arg__�__forward_code__�__forward_evaluated__�__forward_value__�globalsr/�	_getframe�	f_globals�f_back�AssertionError�__forward_frame__)r?�arg�coderDZtyping_globals�frame)rCr4r5r>�s&
!					
	z_ForwardRef.__new__cCs�t|t�s"td|f��t|t�sDtd|f��|js�|dkrr|dkrri}}n'|dkr�|}n|dkr�|}tt|j||�d�|_d|_|jS)Nz+ForwardRef localns must be a dict -- got %rz,ForwardRef globalns must be a dict -- got %rz*Forward references must evaluate to types.T)rU�dictr9r[�_type_checkrSrZr\)rDrHrIr4r4r5rJ�s$

	
		z_ForwardRef._eval_typecCstd��dS)Nz4Forward references cannot be used with isinstance().)r9)rD�objr4r4r5�__instancecheck__�sz_ForwardRef.__instancecheck__cCs^|jsN|jj}|jj}y|j||�Wntk
rMdSYnXt||j�S)NF)r[rbr_�f_localsrJ�	NameError�
issubclassr\)rDr?rHrIr4r4r5�__subclasscheck__�s	
	z_ForwardRef.__subclasscheck__cCsd|jfS)Nz_ForwardRef(%r))rY)rDr4r4r5rM�sz_ForwardRef.__repr__)	r2rLr1rNr>rJrirmrMr4r4)rCr5rR�s
rRc@sdeZdZdZdZdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dS)�
_TypeAliasa�Internal helper class for defining generic variants of concrete types.

    Note that this is not a type; let's call it a pseudo-type.  It can
    be used in instance and subclass checks, e.g. isinstance(m, Match)
    or issubclass(type(m), Match).  However, it cannot be itself the
    target of an issubclass() call; e.g. issubclass(Match, C) (for
    some arbitrary class C) raises TypeError rather than returning
    False.
    r@�type_var�	impl_type�type_checkercOsQt|�dkrDt|dt�rDt|dt�rDtd��tj|�S)z�Constructor.

        This only exists to give a better error message in case
        someone tries to subclass a type alias (not a good idea).
        r.rrTz!A type alias cannot be subclassed)�lenrUrV�tupler9�objectr>)r?rErFr4r4r5r>�s
z_TypeAlias.__new__cCs�t|t�s!tt|���t|t�sBtt|���t|t�sctt|���t|t�s�tt|���||_||_||_||_	dS)atInitializer.

        Args:
            name: The name, e.g. 'Pattern'.
            type_var: The type parameter, e.g. AnyStr, or the
                specific type, e.g. str.
            impl_type: The implementation type.
            type_checker: Function that takes an impl_type instance.
                and returns a value that should be a type_var instance.
        N)
rUrVra�repr�typer7r@rorprq)rDr@rorprqr4r4r5rG�s!!!"			z_TypeAlias.__init__cCsd|jt|j�fS)Nz%s[%s])r@r<ro)rDr4r4r5rM�sz_TypeAlias.__repr__cCs�t|t�s!tt|���t|jt�sCtd|��|jjr�t|t	|jj�s�td||jf��|j
|j||j|j
�S)Nz#%s cannot be further parameterized.z&%s is not a valid substitution for %s.)rUrvrarurorr9�__constraints__rlr	rCr@rprq)rDZ	parameterr4r4r5�__getitem__�s!z_TypeAlias.__getitem__cCstd��dS)Nz.Type aliases cannot be used with isinstance().)r9)rDrhr4r4r5ri�sz_TypeAlias.__instancecheck__cCsX|tkrdSt|t�rD|j|jkoCt|j|j�St||j�SdS)NT)rrUrnr@rlrorp)rDr?r4r4r5rmsz_TypeAlias.__subclasscheck__N)znameztype_varz	impl_typeztype_checker)r2rLr1rNrQr>rGrMrxrirmr4r4r4r5rn�s	
rncCs%|dk	o$t|t�o$|j�S)N)rUr7rK)�tr4r4r5rKsrKcCs't|t�r|j||�S|SdS)N)rUr7rJ)ryrHrIr4r4r5rJsrJcCsa|dkrtd�St|t�r1t|�}t|ttf�s]t|d|f��|S)avCheck that the argument is a type, and return it.

    As a special case, accept None and return type(None) instead.
    Also, _TypeAlias instances (e.g. Match, Pattern) are acceptable.

    The msg argument is a human-readable error message, e.g.

        "Union[arg, ...]: arg should be a type."

    We append the repr() of the actual value (truncated to 100 chars).
    Nz Got %.100r.)rvrUrVrRrnr9)rc�msgr4r4r5rgs
rgcCs`t|t�rRt|t�rR|jdkr8t|�Sd|jt|�fSn
t|�SdS)a)Return the repr() of an object, special-casing types.

    If obj is a type, we return a shorter version than the default
    type.__repr__, based on the module and qualified name, which is
    typically enough to uniquely identify a type.  For everything
    else, we fall back on repr(obj).
    �builtinsz%s.%sN)rUrvr7rLr6ru)rhr4r4r5r</s

r<csIeZdZdZd�fdd�Zdd�Z�fdd�Z�S)	�AnyMetazMetaclass for Any.Fcs%t�j||||d|�}|S)Nr8)r=r>)r?r@rArBr8rD)rCr4r5r>Cs!zAnyMeta.__new__cCstd��dS)Nz%Any cannot be used with isinstance().)r9)rDrhr4r4r5riGszAnyMeta.__instancecheck__cs#t|t�st�j|�SdS)NT)rUrvr=rm)rDr?)rCr4r5rmJszAnyMeta.__subclasscheck__)r2rLr1rNr>rirmr4r4)rCr5r|@sr|c@seZdZdZfZdS)rz�Special type indicating an unconstrained type.

    - Any object is an instance of Any.
    - Any class is a subclass of Any.
    - As a special case, Any and object are subclasses of each other.
    N)r2rLr1rNrQr4r4r4r5rPs�	metaclassr8Tc	sjeZdZdZdddddd�fdd�Zd	d
�Zdd�Zd
d�Zdd�Z�S)ra�Type variable.

    Usage::

      T = TypeVar('T')  # Can be anything
      A = TypeVar('A', str, bytes)  # Must be str or bytes

    Type variables exist primarily for the benefit of static type
    checkers.  They serve as the parameters for generic types as well
    as for generic function definitions.  See class Generic for more
    information on generic types.  Generic functions work as follows:

      def repeat(x: T, n: int) -> Sequence[T]:
          '''Return a list containing n references to x.'''
          return [x]*n

      def longest(x: A, y: A) -> A:
          '''Return the longest of two strings.'''
          return x if len(x) >= len(y) else y

    The latter example's signature is essentially the overloading
    of (str, str) -> str and (bytes, bytes) -> bytes.  Also note
    that if the arguments are instances of some subclass of str,
    the return type is still plain str.

    At runtime, isinstance(x, T) will raise TypeError.  However,
    issubclass(C, T) is true for any class C, and issubclass(str, A)
    and issubclass(bytes, A) are true, and issubclass(int, A) is
    false.

    Type variables may be marked covariant or contravariant by passing
    covariant=True or contravariant=True.  See PEP 484 for more
    details.  By default type variables are invariant.

    Type variables can be introspected. e.g.:

      T.__name__ == 'T'
      T.__constraints__ == ()
      T.__covariant__ == False
      T.__contravariant__ = False
      A.__constraints__ == (str, bytes)
    �boundN�	covariantF�
contravariantcs�t�j||tfidd�}|r<|r<td��t|�|_t|�|_|rx|dk	rxtd��|r�t|�dkr�td��d�t	�fdd	�|D��|_
|r�t|d
�|_n	d|_|S)Nr8Tz+Bivariant type variables are not supported.z-Constraints cannot be combined with bound=...rTz"A single constraint is not allowedz:TypeVar(name, constraint, ...): constraints must be types.c3s|]}t|��VqdS)N)rg)�.0ry)rzr4r5�	<genexpr>�sz"TypeVar.__new__.<locals>.<genexpr>zBound must be a type.)
r=r>rP�
ValueError�bool�
__covariant__�__contravariant__r9rrrsrwrg�	__bound__)r?r@r~rr�ZconstraintsrD)rC)rzr5r>�s$"	zTypeVar.__new__cCsdS)NTr4)rDr4r4r5rK�szTypeVar._has_type_varcCs5|jrd}n|jr$d}nd}||jS)N�+�-�~)r�r�r2)rD�prefixr4r4r5rM�s				zTypeVar.__repr__cCstd��dS)Nz0Type variables cannot be used with isinstance().)r9)rD�instancer4r4r5ri�szTypeVar.__instancecheck__csl�|krdS�tkr dS|jdk	r?t�|j�S|jrht�fdd�|jD��SdS)NTc3s|]}t�|�VqdS)N)rl)r��c)r?r4r5r��sz,TypeVar.__subclasscheck__.<locals>.<genexpr>)rr�rlrw�any)rDr?r4)r?r5rm�s	 zTypeVar.__subclasscheck__)	r2rLr1rNr>rKrMrirmr4r4)rCr5r[s*		�T�KT�VT�T_cor�V_co�VT_co�T_contrar�cs�eZdZdZdd�fdd�Zdd�Zdd	�Z�fd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Z�S)�	UnionMetazMetaclass for Union.NFcs|dkr+t�j||||d|�St|t�sFtd��g}d}xF|D]>}t|t�r�|j|j�qY|jt	||��qYWt
|��t��t|�krg}	x4|D],}
|
�kr�|	j|
��j|
�q�W|	}�st
���t
|��xu|D]m��tkr>tSt�t�rPq(t�t�rbq(t�fdd���hD��r(�j��q(Wt��dkr��j�St�j|||idd�}t�fdd�|D��|_t|j�|_|S)	Nr8zExpected parameters=<tuple>z)Union[arg, ...]: each arg must be a type.c3s-|]#}t|t�st�|�VqdS)N)rUrrl)r�Zt2)�t1r4r5r��sz$UnionMeta.__new__.<locals>.<genexpr>rTTc3s!|]}|�kr|VqdS)Nr4)r�ry)�
all_paramsr4r5r��s)r=r>rUrsr9r��extend�__union_params__�appendrg�setrr�removerarrrnr��pop�	frozenset�__union_set_params__)r?r@rArB�
parametersr8�paramsrz�pZ
new_paramsryrD)rC)r�r�r5r>�sH




!"zUnionMeta.__new__cs^t��fdd�|jD��}||jkr8|S|j|j|ji|dd�SdS)Nc3s!|]}t|���VqdS)N)rJ)r�ry)rHrIr4r5r��sz'UnionMeta._eval_type.<locals>.<genexpr>r8T)rsr�rCr2�	__bases__)rDrHrIr�r4)rHrIr5rJ�szUnionMeta._eval_typecCs1|jr-x!|jD]}t|�rdSqWdS)NTF)r�rK)rDryr4r4r5rKs
	zUnionMeta._has_type_varcsCt�j�}|jr?|ddjdd�|jD��7}|S)Nz[%s]z, css|]}t|�VqdS)N)r<)r�ryr4r4r5r�sz%UnionMeta.__repr__.<locals>.<genexpr>)r=rMr�r:)rD�r)rCr4r5rM	s
	zUnionMeta.__repr__cCsv|jdk	rtd��|fkr3td��t|t�sK|f}|j|j|jt|j�|dd�S)Nz<Cannot subscript an existing Union. Use Union[u, t] instead.z Cannot take a Union of no types.r8T)	r�r9rUrsrCr2r�rf�__dict__)rDr�r4r4r5rxs		zUnionMeta.__getitem__cCs#t|t�stS|j|jkS)N)rUr��NotImplementedr�)rD�otherr4r4r5�__eq__szUnionMeta.__eq__cCs
t|j�S)N)�hashr�)rDr4r4r5�__hash__ szUnionMeta.__hash__cCstd��dS)Nz(Unions cannot be used with isinstance().)r9)rDrhr4r4r5ri#szUnionMeta.__instancecheck__cs��tkrdS�jdkr,t�t�St�t�rn�jdkrNdSt�fdd��jD��St�t�r���jkr�dS�jr�tt�j��SdSt	�fdd��jD��SdS)NTFc3s|]}t|��VqdS)N)rl)r�r�)rDr4r5r�.sz.UnionMeta.__subclasscheck__.<locals>.<genexpr>c3s|]}t�|�VqdS)N)rl)r�ry)r?r4r5r�6s)
rr�rUr��allrrwrlr	r�)rDr?r4)r?rDr5rm&s
 	zUnionMeta.__subclasscheck__)
r2rLr1rNr>rJrKrMrxr�r�rirmr4r4)rCr5r��s2	r�c@s"eZdZdZdZdZdS)r	a�Union type; Union[X, Y] means either X or Y.

    To define a union, use e.g. Union[int, str].  Details:

    - The arguments must be types and there must be at least one.

    - None as an argument is a special case and is replaced by
      type(None).

    - Unions of unions are flattened, e.g.::

        Union[Union[int, str], float] == Union[int, str, float]

    - Unions of a single argument vanish, e.g.::

        Union[int] == int  # The constructor actually returns int

    - Redundant arguments are skipped, e.g.::

        Union[int, str, int] == Union[int, str]

    - When comparing unions, the argument order is ignored, e.g.::

        Union[int, str] == Union[str, int]

    - When two arguments have a subclass relationship, the least
      derived argument is kept, e.g.::

        class Employee: pass
        class Manager(Employee): pass
        Union[int, Employee, Manager] == Union[int, Employee]
        Union[Manager, int, Employee] == Union[int, Employee]
        Union[Employee, Manager] == Employee

    - Corollary: if Any is present it is the sole survivor, e.g.::

        Union[int, Any] == Any

    - Similar for object::

        Union[int, object] == object

    - To cut a tie: Union[object, Any] == Union[Any, object] == Any.

    - You cannot subclass or instantiate a union.

    - You cannot write Union[X][Y] (what would it mean?).

    - You can use Optional[X] as a shorthand for Union[X, None].
    N)r2rLr1rNr�r�r4r4r4r5r	9s2cs7eZdZdZd�fdd�Zdd�Z�S)�OptionalMetazMetaclass for Optional.Fcst�j||||d|�S)Nr8)r=r>)r?r@rArBr8)rCr4r5r>uszOptionalMeta.__new__cCs#t|d�}t|td�fS)Nz#Optional[t] requires a single type.)rgr	rv)rDrcr4r4r5rxxszOptionalMeta.__getitem__)r2rLr1rNr>rxr4r4)rCr5r�rsr�c@seZdZdZfZdS)rzKOptional type.

    Optional[X] is equivalent to Union[X, type(None)].
    N)r2rLr1rNrQr4r4r4r5r}scs�eZdZdZddd�fdd�Zdd�Zdd	�Z�fd
d�Zdd
�Zdd�Z	dd�Z
dd�Z�fdd�Z�S)�	TupleMetazMetaclass for Tuple.NFcs7t�j||||d|�}||_||_|S)Nr8)r=r>�__tuple_params__�__tuple_use_ellipsis__)r?r@rArBr��use_ellipsisr8rD)rCr4r5r>�s!		zTupleMeta.__new__cCs1|jr-x!|jD]}t|�rdSqWdS)NTF)r�rK)rDryr4r4r5rK�s
	zTupleMeta._has_type_varcst|j}|dkr|St��fdd�|D��}||jkrN|S|j|j|ji|dd�SdS)Nc3s!|]}t|���VqdS)N)rJ)r�ry)rHrIr4r5r��sz'TupleMeta._eval_type.<locals>.<genexpr>r8T)r�rsrCr2r�)rDrHrI�tpr�r4)rHrIr5rJ�s	"zTupleMeta._eval_typecset�j�}|jdk	radd�|jD�}|jrJ|jd�|ddj|�7}|S)NcSsg|]}t|��qSr4)r<)r�r�r4r4r5�
<listcomp>�s	z&TupleMeta.__repr__.<locals>.<listcomp>z...z[%s]z, )r=rMr�r�r�r:)rDr�r�)rCr4r5rM�s	
zTupleMeta.__repr__c	s�|jdk	r"td|f��t|t�s:|f}t|�dkr{|dtkr{|dd�}d}d�nd}d�t�fdd	�|D��}|j|j|jt	|j
�|d
|dd�S)NzCannot re-parameterize %rr-rTTz Tuple[t, ...]: t must be a type.Fz*Tuple[t0, t1, ...]: each t must be a type.c3s|]}t|��VqdS)N)rg)r�r�)rzr4r5r��sz(TupleMeta.__getitem__.<locals>.<genexpr>r�r8)r�r9rUrsrr�EllipsisrCr2r�rfr�)rDr�r�r4)rzr5rx�s	"	zTupleMeta.__getitem__cCs#t|t�stS|j|jkS)N)rUr�r�r�)rDr�r4r4r5r��szTupleMeta.__eq__cCs
t|j�S)N)r�r�)rDr4r4r5r��szTupleMeta.__hash__cCstd��dS)Nz(Tuples cannot be used with isinstance().)r9)rDrhr4r4r5ri�szTupleMeta.__instancecheck__cs�|tkrdSt|t�s/t�j|�St|t�rBdSt|t�sat�j|�S|jdkrtdS|jdkr�dS|j	|j	kr�dSt
|j�t
|j�ko�tdd�t|j|j�D��S)NTFcss$|]\}}t||�VqdS)N)rl)r�r3r�r4r4r5r��sz.TupleMeta.__subclasscheck__.<locals>.<genexpr>)
rrUrvr=rmrlrsr�r�r�rrr��zip)rDr?)rCr4r5rm�s$	zTupleMeta.__subclasscheck__)
r2rLr1rNr>rKrJrMrxr�r�rirmr4r4)rCr5r��s
r�c@seZdZdZfZdS)r
a>Tuple type; Tuple[X, Y] is the cross-product type of X and Y.

    Example: Tuple[T1, T2] is a tuple of two elements corresponding
    to type variables T1 and T2.  Tuple[int, float, str] is a tuple
    of an int, a float and a string.

    To specify a variable-length tuple of homogeneous type, use Sequence[T].
    N)r2rLr1rNrQr4r4r4r5r
�scs�eZdZdZddd�fdd�Zdd�Zdd	�Z�fd
d�Zdd
�Zdd�Z	dd�Z
dd�Z�fdd�Z�S)�CallableMetazMetaclass for Callable.FNcs�|dkr|dkrnh|tk	rnt|t�sItd|f��d�t�fdd�|D��}d�t|��}t�j||||d|�}||_||_	|S)Nz8Callable[args, result]: args must be a list. Got %.100r.z6Callable[[arg, ...], result]: each arg must be a type.c3s|]}t|��VqdS)N)rg)r�rc)rzr4r5r��sz'CallableMeta.__new__.<locals>.<genexpr>z.Callable[args, result]: result must be a type.r8)
r�rU�listr9rsrgr=r>�__args__�
__result__)r?r@rArBr8rE�resultrD)rC)rzr5r>�s
!		zCallableMeta.__new__cCs:|jr-x!|jD]}t|�rdSqWt|j�S)NT)r�rKr�)rDryr4r4r5rKs
	zCallableMeta._has_type_varc
s�|jdkr"|jdkr"|S|jtkr=|j}n��fdd�|jD�}t|j���}||jkr�||jkr�|S|j|j|jid|d|dd�SdS)Ncs"g|]}t|����qSr4)rJ)r�ry)rHrIr4r5r�s	z+CallableMeta._eval_type.<locals>.<listcomp>rEr�r8T)r�r�r�rJrCr2r�)rDrHrIrEr�r4)rHrIr5rJszCallableMeta._eval_typecs�t�j�}|jdk	s-|jdk	r�|jtkrEd}n#ddjdd�|jD��}|d|t|j�f7}|S)Nz...z[%s]z, css|]}t|�VqdS)N)r<)r�ryr4r4r5r�sz(CallableMeta.__repr__.<locals>.<genexpr>z[%s, %s])r=rMr�r�r�r:r<)rDr�Zargs_r)rCr4r5rMs	zCallableMeta.__repr__c
Cs�|jdk	s|jdk	r*td��t|t�sLt|�dkrXtd��|\}}|j|j|jt	|j
�ddd|d|�S)Nz,This Callable type is already parameterized.r-z6Callable must be used as Callable[[arg, ...], result].r8TrEr�)r�r�r9rUrsrrrCr2r�rfr�)rDr�rEr�r4r4r5rx!s"	zCallableMeta.__getitem__cCs5t|t�stS|j|jko4|j|jkS)N)rUr�r�r�r�)rDr�r4r4r5r�,szCallableMeta.__eq__cCst|j�t|j�AS)N)r�r�r�)rDr4r4r5r�2szCallableMeta.__hash__cCs>|jdkr.|jdkr.t|tj�Std��dS)Nz,Callable[] cannot be used with isinstance().)r�r�rU�collections_abcrr9)rDrhr4r4r5ri5szCallableMeta.__instancecheck__cs[|tkrdSt|t�s/t�j|�S|jdkrQ|jdkrQdS||kS)NT)rrUr�r=rmr�r�)rDr?)rCr4r5rm>szCallableMeta.__subclasscheck__)
r2rLr1rNr>rKrJrMrxr�r�rirmr4r4)rCr5r��s	r�c@seZdZdZfZdS)ra�Callable type; Callable[[int], str] is a function of (int) -> str.

    The subscription syntax must always be used with exactly two
    values: the argument list and the return type.  The argument list
    must be a list of types; the return type must be a single type.

    There is no syntax to indicate optional or keyword arguments,
    such function types are rarely used as callback types.
    N)r2rLr1rNrQr4r4r4r5rIs	cCs8t|t�st�x|jdk	r3|j}qW|S)z.Return the farthest origin of a generic class.N)rU�GenericMetara�
__origin__)�ar4r4r5�_gorgWs
r�cCs:t|t�rt|t�s$t�t|�t|�kS)a%Return whether two generic classes are equivalent.

    The intention is to consider generic class X and any of its
    parameterized forms (X[T], X[int], etc.)  as equivalent.

    However, X is not equivalent to a subclass of X.

    The relation is reflexive, symmetric and transitive.
    )rUr�rar�)r��br4r4r5�_geqv_s
$r�cs�eZdZdZdZddd�fdd�Zdd�Z�fdd�Zd	d
�Zdd�Z	d
d�Z
dd�Z�fdd�Z�S)r�zMetaclass for generic types.Ncs8|dkr�d}x�|D]�}t|t�rt|t�sStdt|���|jdkreqxh|jD]]}	t|	�r�t|	t�r�td|	��|dkr�g}|	|kro|j|	�qoWqW|dk	r�t	|�}t
�j||||dd�}
||
_|dk	r+||
_||
_
|
S)Nz&You cannot inherit from magic class %szKCannot inherit from a generic class parameterized with non-type-variable %sr8T)rUr7r�r9ru�__parameters__rKrr�rsr=r>�	__extra__r�)r?r@rArBr��origin�extrar��baseZbprD)rCr4r5r>{s6

!			zGenericMeta.__new__cCs1|jr-x!|jD]}t|�rdSqWdS)NTF)r�rK)rDryr4r4r5rK�s
	zGenericMeta._has_type_varcsIt�j�}|jdk	rE|ddjdd�|jD��7}|S)Nz[%s]z, css|]}t|�VqdS)N)r<)r�r�r4r4r5r��sz'GenericMeta.__repr__.<locals>.<genexpr>)r=rMr�r:)rDr�)rCr4r5rM�s
!zGenericMeta.__repr__cCs2t|t�stSt||�o1|j|jkS)N)rUr�r�r�r�)rDr�r4r4r5r��szGenericMeta.__eq__cCst|j|jf�S)N)r�r2r�)rDr4r4r5r��szGenericMeta.__hash__c
s�t|t�s|f}|s*td��d�t�fdd�|D��}|jdkr�x-|D]%}t|t�setd|��qeWtt|��t|�kr�td��n�t|�t|j�kr�tdt|j�t|�f��x�t||j�D]t\}}t|t�rN|js5qt	|t
|j�rNqt	||�stdt|�t|�|f��qW|j|j
|f|jt|j�d	|d
|d|j�S)Nz Cannot have empty parameter listz*Parameters to generic types must be types.c3s|]}t|��VqdS)N)rg)r�r�)rzr4r5r��sz*GenericMeta.__getitem__.<locals>.<genexpr>z1Initial parameters must be type variables; got %sz4All type variables in Generic[...] must be distinct.z+Cannot change parameter count from %d to %dz!Cannot substitute %s for %s in %sr�r�r�)rUrsr9r�rrrr�r�rwrlr	r<rCr2r�rfr�r�)rDr�r��new�oldr4)rzr5rx�s@	
	#zGenericMeta.__getitem__cCs|j|j�S)N)rmrC)rDr�r4r4r5ri�szGenericMeta.__instancecheck__csj|tkrdSt|t�r"|j}|dk	r"||jkr"t|j�t|j�ksgt�t|j�t|j�ks�t�x�t|j|j|j�D]s\}}}t|t�r
|j	r�t
||�s
Pq|jr�t
||�s
Pq||krPq�||kr�Pq�WdSt�j
|�r8dS|jdksVt|t�rZdSt
||j�S)NTF)rrUr�r�rrr�rar�rr�rlr�r=rmr�)rDr?r�Zp_selfZp_clsZp_origin)rCr4r5rm�s6	$$		zGenericMeta.__subclasscheck__)
r2rLr1rNr�r>rKrMr�r�rxrirmr4r4)rCr5r�ns
%&r�c@s(eZdZdZfZdd�ZdS)raAbstract base class for generic types.

    A generic type is typically declared by inheriting from an
    instantiation of this class with one or more type variables.
    For example, a generic mapping type might be defined as::

      class Mapping(Generic[KT, VT]):
          def __getitem__(self, key: KT) -> VT:
              ...
          # Etc.

    This class can then be used as follows::

      def lookup_name(mapping: Mapping, key: KT, default: VT) -> VT:
          try:
              return mapping[key]
          except KeyError:
              return default

    For clarity the type variables may be redefined, e.g.::

      X = TypeVar('X')
      Y = TypeVar('Y')
      def lookup_name(mapping: Mapping[X, Y], key: X, default: Y) -> Y:
          # Same body as above.
    cOsut}xYt|jdd��D]>\}}t|t�r t|�tkr |j|d}q W|jt|��S)NrT���)rt�	enumerate�__mro__rUr�r�rr>)r?rErFZnext_in_mro�ir�r4r4r5r>-s
&!zGeneric.__new__N)r2rLr1rNrQr>r4r4r4r5rscCs|S)z�Cast a value to a type.

    This returns the value unchanged.  To the type checker this
    signals that the return value has the designated type, but at
    runtime we intentionally don't check anything (we want this
    to be as fast as possible).
    r4)�typ�valr4r4r5r&6scCs�|j}|j}|j}|j}||||�}|d|�}|jpTf}|j}|rrt|�ni}|t|�}	xCt||	d�|�D](\}
}|
|ks�t	�|||
<q�W|S)z:Internal helper to extract the default arguments, by name.N)
�__code__�co_argcount�co_kwonlyargcount�co_varnames�__defaults__�__kwdefaults__rfrrr�ra)�funcrdZ	pos_countZkw_countZ	arg_namesZkwarg_names�defaultsZ
kwdefaults�resZ
pos_offsetr@�valuer4r4r5�
_get_defaultsAs					&r�cCs�t|dd�riS|dkrIt|di�}|dkr[|}n|dkr[|}t|�}t|j�}xw|j�D]i\}}t|t�r�t|�}t|||�}||kr�||dkr�t	|}|||<q�W|S)a>Return type hints for a function or method object.

    This is often the same as obj.__annotations__, but it handles
    forward references encoded as string literals, and if necessary
    adds Optional[t] if a default value equal to None is set.

    BEWARE -- the behavior of globalns and localns is counterintuitive
    (unless you are familiar with how eval() and exec() work).  The
    search order is locals first, then globals.

    - If no dict arguments are passed, an attempt is made to use the
      globals from obj, and these are also used as the locals.  If the
      object does not appear to have globals, an exception is raised.

    - If one dict argument is passed, it is used for both globals and
      locals.

    - If two dict arguments are passed, they specify globals and
      locals, respectively.
    �__no_type_check__N�__globals__)
�getattrr�rf�__annotations__�itemsrUrVrRrJr)rhrHrIr�Zhintsr@r�r4r4r5r'Ss$	
cCsTt|t�rGx>|jj�D]!}t|tj�rd|_qWn	d|_|S)a0Decorator to indicate that annotations are not type hints.

    The argument must be a class or function; if it is a class, it
    applies recursively to all methods defined in that class (but not
    to methods defined in its superclasses or subclasses).

    This mutates the function(s) in place.
    T)rUrvr��values�types�FunctionTyper�)rcrhr4r4r5r(}s		cs%tj���fdd��}|S)z�Decorator to give another decorator the @no_type_check effect.

    This wraps the decorator with something that wraps the decorated
    function in @no_type_check.
    cs�||�}t|�}|S)N)r()rErFr�)�	decoratorr4r5�wrapped_decorator�sz2no_type_check_decorator.<locals>.wrapped_decorator)�	functools�wraps)r�r�r4)r�r5r)�s!cCstd��dS)Nz.Overloading is only supported in library stubs)�RuntimeError)r�r4r4r5r*�sc@s:eZdZdZdd�Zdd�Zdd�ZdS)	�
_ProtocolMetaz~Internal metaclass for _Protocol.

    This exists so _Protocol classes can be generic without deriving
    from Generic.
    cCstd��dS)Nz+Protocols cannot be used with isinstance().)r9)rDrhr4r4r5ri�sz_ProtocolMeta.__instancecheck__csd|js
tS|tkrdS|j�}x4|D],�t�fdd�|jD��s0dSq0WdS)NTc3s|]}�|jkVqdS)N)r�)r��d)�attrr4r5r��sz2_ProtocolMeta.__subclasscheck__.<locals>.<genexpr>F)rOr��	_Protocol�_get_protocol_attrsr�r�)rDr?�attrsr4)r�r5rm�s	
"z_ProtocolMeta.__subclasscheck__cCs@g}x?|jD]4}t|dd�r|jdkr|j|�qWt�}x�|D]�}x�|jj�D]�}x�|jD]5}||k	r~||jkr~t|dd�r~Pq~W|jd�rn|dkrn|dkrn|dkrn|dkrn|dkrn|d	krn|d
krn|dkrn|j|�qnWqXW|S)NrOFr��_abc_�__abstractmethods__r�rQr�r�r�rL)	r�r�r2r�r�r��keys�
startswith�add)rDZprotocol_basesr�r�r�r�r4r4r5r��s,!	
z!_ProtocolMeta._get_protocol_attrsN)r2rLr1rNrirmr�r4r4r4r5r��sr�c@s"eZdZdZfZdZdS)r�z�Internal base class for protocol classes.

    This implements a simple-minded structural isinstance check
    (similar but more general than the one-offs in collections.abc
    such as Hashable).
    TN)r2rLr1rNrQrOr4r4r4r5r��sr�c@seZdZfZdS)rN)r2rLr1rQr4r4r4r5r�sr�c@seZdZfZdS)rN)r2rLr1rQr4r4r4r5r�sc@s1eZdZfZeeddd���ZdS)r)�returncCsdS)Nr4)rDr4r4r5�__int__�szSupportsInt.__int__N)r2rLr1rQr�intr�r4r4r4r5r�sc@s1eZdZfZeeddd���ZdS)r)r�cCsdS)Nr4)rDr4r4r5�	__float__szSupportsFloat.__float__N)r2rLr1rQr�floatr�r4r4r4r5rsc@s1eZdZfZeeddd���ZdS)�SupportsComplex)r�cCsdS)Nr4)rDr4r4r5�__complex__szSupportsComplex.__complex__N)r2rLr1rQr�complexr�r4r4r4r5r�sr�c@s1eZdZfZeeddd���ZdS)�
SupportsBytes)r�cCsdS)Nr4)rDr4r4r5�	__bytes__szSupportsBytes.__bytes__N)r2rLr1rQr�bytesr�r4r4r4r5r�sr�c@s1eZdZfZeeddd���ZdS)r)r�cCsdS)Nr4)rDr4r4r5�__abs__szSupportsAbs.__abs__N)r2rLr1rQrr�r�r4r4r4r5rsc@s7eZdZfZedeeddd���ZdS)rr)�ndigitsr�cCsdS)Nr4)rDr�r4r4r5�	__round__#szSupportsRound.__round__N)r2rLr1rQrr�r�r�r4r4r4r5r sc@s1eZdZfZedddd���ZdS)rzIterator[T_co])r�cCsdS)Nr4)rDr4r4r5�__reversed__+szReversible.__reversed__N)r2rLr1rQrrr4r4r4r5r(sc@seZdZfZdS)r
N)r2rLr1rQr4r4r4r5r
3sc@seZdZdS)rN)r2rLr1r4r4r4r5r:sc@seZdZdS)rN)r2rLr1r4r4r4r5r?sc@seZdZdS)rN)r2rLr1r4r4r4r5rDsc@seZdZdS)rN)r2rLr1r4r4r4r5rIsc@seZdZdS)rN)r2rLr1r4r4r4r5rMsc@seZdZdS)rN)r2rLr1r4r4r4r5rRsc@seZdZdS)rN)r2rLr1r4r4r4r5rVs�c@seZdZdd�ZdS)r!cOs.t|t�rtd��tj|||�S)Nz4Type List cannot be instantiated; use list() instead)r�r!r9r�r>)r?rErFr4r4r5r>_szList.__new__N)r2rLr1r>r4r4r4r5r!]sc@seZdZdd�ZdS)r"cOs.t|t�rtd��tj|||�S)Nz2Type Set cannot be instantiated; use set() instead)r�r"r9r�r>)r?rErFr4r4r5r>hszSet.__new__N)r2rLr1r>r4r4r4r5r"fscs(eZdZdZ�fdd�Z�S)�_FrozenSetMetaz�This metaclass ensures set is not a subclass of FrozenSet.

    Without this metaclass, set would be considered a subclass of
    FrozenSet, because FrozenSet.__extra__ is collections.abc.Set, and
    set is a subclass of that.
    cs#t|t�rdSt�j|�S)NF)rlr"r=rm)rDr?)rCr4r5rmwsz _FrozenSetMeta.__subclasscheck__)r2rLr1rNrmr4r4)rCr5rosrc@s"eZdZfZdd�ZdS)�	FrozenSetcOs.t|t�rtd��tj|||�S)Nz>Type FrozenSet cannot be instantiated; use frozenset() instead)r�rr9r�r>)r?rErFr4r4r5r>�szFrozenSet.__new__N)r2rLr1rQr>r4r4r4r5r}src@seZdZdS)rN)r2rLr1r4r4r4r5r�sc@seZdZdS)rN)r2rLr1r4r4r4r5r�sc@seZdZdS)rN)r2rLr1r4r4r4r5r�sc@seZdZdS)rN)r2rLr1r4r4r4r5r�sc@seZdZdd�ZdS)r cOs.t|t�rtd��tj|||�S)Nz4Type Dict cannot be instantiated; use dict() instead)r�r r9rfr>)r?rErFr4r4r5r>�szDict.__new__N)r2rLr1r>r4r4r4r5r �scs(eZdZfZ�fdd�Z�S)r$cs1t|t�rtd��t�j|||�S)Nz@Type Generator cannot be instantiated; create a subclass instead)r�r$r9r=r>)r?rErF)rCr4r5r>�szGenerator.__new__)r2rLr1rQr>r4r4)rCr5r$�scCs�dd�|D�}tj|dd�|D��}t|�|_y%tjd�jjdd�|_Wnt	t
fk
r�YnX|S)a�Typed version of namedtuple.

    Usage::

        Employee = typing.NamedTuple('Employee', [('name', str), 'id', int)])

    This is equivalent to::

        Employee = collections.namedtuple('Employee', ['name', 'id'])

    The resulting class has one extra attribute: _field_types,
    giving a dict mapping field names to types.  (The field names
    are in the _fields attribute, which is part of the namedtuple
    API.)
    cSs"g|]\}}||f�qSr4r4)r��nryr4r4r5r��s	zNamedTuple.<locals>.<listcomp>cSsg|]\}}|�qSr4r4)r�rryr4r4r5r��s	rTr2�__main__)�collections�
namedtuplerfZ_field_typesr/r^r_�getrL�AttributeErrorr�)�typenameZfieldsr?r4r4r5r#�s%c@sgeZdZdZfZeeddd���Zeeddd���Ze	dddd	���Z
e	edd
d���Ze	e
ddd
���Ze	dddd���Ze	eddd���Ze	d6e
eddd���Ze	eddd���Ze	d7e
eddd���Ze	d8e
eeddd���Ze	de
e
e
dd d!���Ze	edd"d#���Ze	e
dd$d%���Ze	de
e
d&d'd(���Ze	edd)d*���Ze	ee
d+d,d-���Ze	eedd.d/d0���Ze	d1dd2d3���Ze	ddd4d5���ZdS)9�IOa�Generic base class for TextIO and BinaryIO.

    This is an abstract, generic version of the return of open().

    NOTE: This does not distinguish between the different possible
    classes (text vs. binary, read vs. write vs. read/write,
    append-only, unbuffered).  The TextIO and BinaryIO subclasses
    below capture the distinctions between text vs. binary, which is
    pervasive in the interface; however we currently do not offer a
    way to track the other distinctions in the type system.
    )r�cCsdS)Nr4)rDr4r4r5�mode�szIO.modecCsdS)Nr4)rDr4r4r5r@�szIO.nameNcCsdS)Nr4)rDr4r4r5�close�szIO.closecCsdS)Nr4)rDr4r4r5�closed�sz	IO.closedcCsdS)Nr4)rDr4r4r5�fileno�sz	IO.filenocCsdS)Nr4)rDr4r4r5�flush�szIO.flushcCsdS)Nr4)rDr4r4r5�isatty�sz	IO.isattyrT)rr�cCsdS)Nr4)rDrr4r4r5�read�szIO.readcCsdS)Nr4)rDr4r4r5�readableszIO.readable)�limitr�cCsdS)Nr4)rDrr4r4r5�readlineszIO.readline)�hintr�cCsdS)Nr4)rDrr4r4r5�	readlines	szIO.readlinesr)�offset�whencer�cCsdS)Nr4)rDrrr4r4r5�seek
szIO.seekcCsdS)Nr4)rDr4r4r5�seekableszIO.seekablecCsdS)Nr4)rDr4r4r5�tellszIO.tell)�sizer�cCsdS)Nr4)rDrr4r4r5�truncateszIO.truncatecCsdS)Nr4)rDr4r4r5�writableszIO.writable)�sr�cCsdS)Nr4)rDr r4r4r5�write!szIO.write)�linesr�cCsdS)Nr4)rDr"r4r4r5�
writelines%sz
IO.writelinesz
IO[AnyStr]cCsdS)Nr4)rDr4r4r5�	__enter__)szIO.__enter__cCsdS)Nr4)rDrvr��	tracebackr4r4r5�__exit__-szIO.__exit__r�r�r�) r2rLr1rNrQrrVrr@rr
r�rr�rrrr%rrrr!rrrrrrr!r#r$r&r4r4r4r5r�sT"!rc@s_eZdZdZfZeeeefe	ddd���Z
edddd���ZdS)	�BinaryIOz5Typed version of the return of open() in binary mode.)r r�cCsdS)Nr4)rDr r4r4r5r!7szBinaryIO.write)r�cCsdS)Nr4)rDr4r4r5r$;szBinaryIO.__enter__N)r2rLr1rNrQrr	r��	bytearrayr�r!r$r4r4r4r5r'2s%r'c@s�eZdZdZfZeeddd���Zeeddd���Z	eeddd���Z
eedd	d
���Zee
ddd���Zeddd
d���ZdS)�TextIOz3Typed version of the return of open() in text mode.)r�cCsdS)Nr4)rDr4r4r5�bufferEsz
TextIO.buffercCsdS)Nr4)rDr4r4r5�encodingIszTextIO.encodingcCsdS)Nr4)rDr4r4r5�errorsMsz
TextIO.errorscCsdS)Nr4)rDr4r4r5�line_bufferingQszTextIO.line_bufferingcCsdS)Nr4)rDr4r4r5�newlinesUszTextIO.newlinescCsdS)Nr4)rDr4r4r5r$YszTextIO.__enter__N)r2rLr1rNrQrr'r*rVr+r,r�r-rr.rr$r4r4r4r5r)@sr)c@s7eZdZdZdddgZeZeZeZdS)r+z)Wrapper namespace for IO generic classes.rr)r'N)r2rLr1rN�__all__rr)r'r4r4r4r5r+^s
z.io�Pattern�cCs|jS)N)�pattern)r�r4r4r5�<lambda>ksr3�MatchcCs
|jjS)N)r,r2)�mr4r4r5r3msc@s.eZdZdZddgZeZeZdS)r,z&Wrapper namespace for re type aliases.r0r4N)r2rLr1rNr/r0r4r4r4r4r5r,psz.re)k�abcrrrr�r,Z	stdlib_rer/r��collections.abcr��ImportErrorr/r6rvr7rPrRrnrKrJrgr<r|rrr�r�r�r�r�r�r�r�rVr%r�r	r�rr�r
r�rr�r��ABCMetar�rr&r�r'r(r)r*r�r�rrrrrr�r�rrrrr
r"rrrrrrr�r�register�
memoryviewr�r!r�rr�rrrrrrfr �hasattrr$Z_G_base�
GeneratorTyper#rr'r)r+r2�modulesrWr0�matchr4r4r4r4r5�<module>s 
	)	=M""\u"9"	X"
^"�'*:	##	#!#()!##		#
& ##
	'	
`



Rosenblum TV: Video training, virtual workshops, classes, tutorials
logologologologo
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact

RE-INVENTING THE TELEVISION NEWS BUSINESS*

A revolution in video storytelling

Creating entirely new & cost-effective production methods

From the world leaders in video production training and the creators of Character Driven Storytelling™

*and every other business that uses video

WHAT WE DO

Over the past 35 years, we have designed, built or restructured some of the most powerful news and journalism companies in the world.

We replace the traditional TV news ‘crew’ with one highly trained journalist, working alone with nothing but an iPhone.

No more TV news ‘crews’, no editors and no field producers.

This is television news done the way newspaper journalism is done – one reporter with their electronic pad and pencil.

In doing this, we can cut the cost of production by as much as 75% while increasing ratings and audience engagement.

In the place of conventional TV news ‘packages’ – ie, reporter stand up, interview, b-roll, man on the street, we marry great journalism with Netflix and Hollywood storytelling.

It’s a combination that works.

We have taken most of our clients to #1 in their respective markets.

And it’s not just for news. Any company, any profit, any NGO and anyone else who is online needs to tell their story in compelling yet cost-effective video. We can teach you to do that. Either in person or virtually.

EXAMPLES OF WHAT WE CAN TEACH YOUR STAFF TO PRODUCE

ITAY HOD

Itay Hod, MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2018.

Because he works alone, with only an iPhone, he was able to embed himself with a homeless family.

Here’s the story he produced in a one-day turn.

KIET DO

Kiet Do, an MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2021.

Here is a story he produced, all on his own, with only an iPhone and in a one-day turn.

TAYLOR SCHAUB

Taylor Schaub, an MMJ with Spectrum News 1 in LA, took the 5-Day Intensive Video Storytelling Bootcamp in 2023.

Here is a story he turned in only one day, using only an iPhone. It was the first video story he ever did and it was nominated for an Emmy.

THE BOOTCAMP

How do we convert stations and whole networks to working in this way?

Since 1988, we have run intensive 5-Day Video Storytelling Bootcamps

We have done these all over the world.

These are hands-on bootcamps, and participants learn an entirely new way of creating TV news stories.

-We shoot at a 3:1 ratio or lower, so turnaround times are fast.

-We go directly from camera to timelilne and edit – no written scripts.  We work in the medium of pictures and sound.

-We are entirely character-driven.

-We are driven by pictures and real events.

-We are focused almost entirely on ’the viewer experience’.

Since 1988, more than 70,000 journalists around the world have taken our bootcamps, either in person on virtualy.

Case Studies

CBS Case Study Logos
CBS News

We have started to work with CBS News, bringing our ideas of character-driven storytelling to one of the most successful and biggest networks in the United States. Since beginning to work with them ratings have climbed and more importantly, audience engagement is through the ceiling.

Learn More
NYT Case Study Logos
New York Times Television

We started New York Times Television in 1990 and it was the first paper to be brought into the world of TV. It quickly became one of the most successful non-fiction production companies in the United States. The series and documentaries we produced won many awards including multiple Emmys.

Learn More
BBC Case Study Logos
The BBC

We have been working with the BBC since the year 2000 helping to convert their national news network to our visual storytelling technique. Most recently we have trained teams from their sports, documentaries, and comedy divisions to make character-driven stories using only smartphones.

Learn More
Spectrum Case Study Logos
Spectrum News

For the past five years we have worked with Spectrum News to introduce and train their journalists on visual, character driven storytelling using smartphones helping to create a different kind of local news for their network of 24-Hour News Stations across the United States.

Learn More
UN Case Study Logos
The United Nations

In 2006, we were approached by the United Nations. Rather than rely on news outlets, it would be much easier to train the field operatives to produce their own stories. We spent two years working with the UN, training more than 100 of their staff in bootcamps in Geneva and Nairobi.

Learn More
Star Ledger Case Study Logos
The Newark Star-Ledger

We trained 50 print reporters at the paper to shoot and tell their own stories, in conjunction with their print work. We built a TV newsroom in their existing print newsroom – you could not ask for a better set and they began to live stream their stories in conjunction with their print work.

Learn More
Mcgraw Hill Case Study Logos
Mcgraw Hill

We spent two years with McGraw Hill, training more than 150 of their staffers, making them completely video literate. McGraw/Hill media properties we transit included Business Week, Aviation Week, (what was the name of the architecture magazine), and JD Power and Associates.

Learn More
VOA Case Study Logos
Voice of America

In 1990, we were approached by The Voice of America, the official broadcasting agency for the United States Government. When we met with VOA, they were only a short wave radio broadcaster, but working with them, we took them into television, launching VOA-TV.

Learn More
Oyster Case Study Logos
Oyster Yachts

British based Oyster Yachts makes some of the finest yachts in the world. Like every other company, they had to find a way to feed the never-ending video demands of social media – sites like Instagram and TikTok. We trained the Oyster staff to tell their own stories, using only iPhones.

Learn More
SEPA Case Study Logos
Scottish Environmental Protection Agency

We were approached by SEPA, the Scottish Environmental Protection Agency because they had to continually find a way to ‘feed the media beast’. The result was that SEPA was able to tell their own stories, whenever they wanted, and at almost no additional cost.

Learn More
Image 11-11-22 at 6.25 PM

Michael on Media

Michael Rosenblum has been writing about the media since 1988. His work and ideas have appeared in The Guardian, The Huffington Post, Ilkeston Life and many other publications.

He has been blogging regularly for the past 35 years on this subject. Having taught media studies at Columbia University, NYU and now the University of Oxford, he is considered an expert on this subject.

Continue reading this post or look back at previous posts.

Read More

Do You Have Questions About Learning Video Skills?

If you would like to know more about our courses contact us and one of our training advisors will be happy to call you.

Contact Us

Copyright 2024. All rights reserved.