简体   繁体   中英

python use for #! besides shebang?

I am reading some python code that looks like this:

#this is here for documentation generation
""" 
#! [ereader]
        #this code is in Client::connect() so it's automatically done, no need
        # for user to do it
        self.reader = reader.EReader(self.conn, self.msg_queue)
        self.reader.start()   # start thread

#! [ereader]
"""

@iswrapper
#! [historicaldataend]
def historicalDataEnd(self, reqId:int, start:str, end:str):
    super().historicalDataEnd(reqId, start, end)
    print("HistoricalDataEnd ", reqId, "from", start, "to", end)
#! [historicaldataend]

is the #! ['function name'] just an enclosing comment, or is there something deeper going on here?

I'm going to just say that this is part of their documentation system for now. It would be nice to know what they are using, but the bottom line is that this just functions as a comment and I can ignore it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM