parameters: (self, type_, dialect_name)
return_statement: return Variant(self, {dialect_name: to_instance(type_)})
docstring: r"""Produce a new type object that will utilize the given
          type when applied to the dialect of the given name.
  
          e.g.::
  
              from sqlalchemy.types import String
              from sqlalchemy.dialects import mysql
  
              s = String()
  
              s = s.with_variant(mysql.VARCHAR(collation='foo'), 'mysql')
  
          The construction of :meth:`.TypeEngine.with_variant` is always
          from the "fallback" type to that which is dialect specific.
          The returned type is an instance of :class:`.Variant`, which
          itself provides a :meth:`.Variant.with_variant`
          that can be called repeatedly.
  
          :param type\_: a :class:`.TypeEngine` that will be selected
           as a variant from the originating type, when a dialect
           of the given name is in use.
          :param dialect_name: base name of the dialect which uses
           this type. (i.e. ``'postgresql'``, ``'mysql'``, etc.)
docstring_summary: r"""Produce a new type object that will utilize the given
          type when applied to the dialect of the given name.
docstring_tokens: r Produce a new type object that will utilize the given type when applied to the dialect of the given name .
function: def with_variant(self, type_, dialect_name):
          r"""Produce a new type object that will utilize the given
          type when applied to the dialect of the given name.
  
          e.g.::
  
              from sqlalchemy.types import String
              from sqlalchemy.dialects import mysql
  
              s = String()
  
              s = s.with_variant(mysql.VARCHAR(collation='foo'), 'mysql')
  
          The construction of :meth:`.TypeEngine.with_variant` is always
          from the "fallback" type to that which is dialect specific.
          The returned type is an instance of :class:`.Variant`, which
          itself provides a :meth:`.Variant.with_variant`
          that can be called repeatedly.
  
          :param type\_: a :class:`.TypeEngine` that will be selected
           as a variant from the originating type, when a dialect
           of the given name is in use.
          :param dialect_name: base name of the dialect which uses
           this type. (i.e. ``'postgresql'``, ``'mysql'``, etc.)
  
          """
          return Variant(self, {dialect_name: to_instance(type_)})
function_tokens: def with_variant ( self , type_ , dialect_name ) : return Variant ( self , { dialect_name : to_instance ( type_ ) } )