def selectDialect(protocol, dialect): """ Dictate a Banana dialect to use. @param protocol: A L{banana.Banana} instance which has not yet had a dialect negotiated. @param dialect: A L{bytes} instance naming a Banana dialect to select. """ # We can't do this the normal way by delivering bytes because other setup # stuff gets in the way (for example, clients and servers have incompatible # negotiations for this step). So use the private API to make this happen. protocol._selectDialect(dialect)