Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
reflection.py37 linesDownload Raw Back to protobuf
1# Protocol Buffers - Google's data interchange format2# Copyright 2008 Google Inc.  All rights reserved.3#4# Use of this source code is governed by a BSD-style5# license that can be found in the LICENSE file or at6# https://developers.google.com/open-source/licenses/bsd7 8# This code is meant to work on Python 2.4 and above only.9 10"""Contains a metaclass and helper functions used to create11protocol message classes from Descriptor objects at runtime.12 13Recall that a metaclass is the "type" of a class.14(A class is to a metaclass what an instance is to a class.)15 16In this case, we use the GeneratedProtocolMessageType metaclass17to inject all the useful functionality into the classes18output by the protocol compiler at compile-time.19 20The upshot of all this is that the real implementation21details for ALL pure-Python protocol buffers are *here in22this file*.23"""24 25__author__ = 'robinson@google.com (Will Robinson)'26 27import warnings28 29from google.protobuf import message_factory30from google.protobuf import symbol_database31 32# The type of all Message classes.33# Part of the public interface, but normally only used by message factories.34GeneratedProtocolMessageType = message_factory._GENERATED_PROTOCOL_MESSAGE_TYPE35 36MESSAGE_CLASS_CACHE = {}37 
codekingpro/portable-devtools · Team Ai