Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/tensorflow/python/autograph/operators/__init__.py: 100%
29 statements
« prev ^ index » next coverage.py v7.4.0, created at 2024-01-03 07:57 +0000
« prev ^ index » next coverage.py v7.4.0, created at 2024-01-03 07:57 +0000
1# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# ==============================================================================
15"""This module implements operators that AutoGraph overloads.
17Note that "operator" is used loosely here, and includes control structures like
18conditionals and loops, implemented in functional form, using for example
19closures for the body.
20"""
22# Naming conventions:
23# * operator names match the name usually used for the respective Python
24# idiom; examples: for_stmt, list_append
25# * operator arguments match either of:
26# - the corresponding Python AST attribute (e.g. the condition of an if
27# statement is called test) if the operator represents an AST construct
28# - the names used in the Python docs, if the operator is a function (e.g.
29# list_ and x for append, see
30# https://docs.python.org/3.7/tutorial/datastructures.html)
31#
32# All operators may accept a final argument named "opts", of a type that
33# subclasses namedtuple and contains any arguments that are only required
34# for some specializations of the operator.
36from tensorflow.python.autograph.operators.conditional_expressions import if_exp
37from tensorflow.python.autograph.operators.control_flow import for_stmt
38from tensorflow.python.autograph.operators.control_flow import if_stmt
39from tensorflow.python.autograph.operators.control_flow import while_stmt
40from tensorflow.python.autograph.operators.data_structures import list_append
41from tensorflow.python.autograph.operators.data_structures import list_pop
42from tensorflow.python.autograph.operators.data_structures import list_stack
43from tensorflow.python.autograph.operators.data_structures import ListPopOpts
44from tensorflow.python.autograph.operators.data_structures import ListStackOpts
45from tensorflow.python.autograph.operators.data_structures import new_list
46from tensorflow.python.autograph.operators.exceptions import assert_stmt
47from tensorflow.python.autograph.operators.logical import and_
48from tensorflow.python.autograph.operators.logical import eq
49from tensorflow.python.autograph.operators.logical import not_
50from tensorflow.python.autograph.operators.logical import not_eq
51from tensorflow.python.autograph.operators.logical import or_
52from tensorflow.python.autograph.operators.py_builtins import float_
53from tensorflow.python.autograph.operators.py_builtins import int_
54from tensorflow.python.autograph.operators.py_builtins import len_
55from tensorflow.python.autograph.operators.py_builtins import print_
56from tensorflow.python.autograph.operators.py_builtins import range_
57from tensorflow.python.autograph.operators.slices import get_item
58from tensorflow.python.autograph.operators.slices import GetItemOpts
59from tensorflow.python.autograph.operators.slices import set_item
60from tensorflow.python.autograph.operators.variables import ld
61from tensorflow.python.autograph.operators.variables import ldu
62from tensorflow.python.autograph.operators.variables import Undefined
63from tensorflow.python.autograph.operators.variables import UndefinedReturnValue