title: Pylint message: Invalid constant name (invalid-name)
body: <p>Pylint complains about <code>Invalid constant name "myprint" (invalid-name)</code> in the case of a shorthand for a logger function.</p>
  
  <pre><code># import
  from utils import get_logger
  LOGFILE = '6_evaluator.log'
  myprint = get_logger(LOGFILE)
  
  def main():
      # some stuff
      myprint('log log')
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>Can this be done without tweaking the pylint configuration ?</p>
  
  <p>If needed, here is the definition of <code>get_logger</code>:</p>
  
  <pre><code>import logging
  import os
  
  def get_logger(logfile):
      """ Return a logger that log on stdout and in LOGFILE"""
      if os.path.isfile('{}'.format(logfile)):
          os.remove('{}'.format(logfile))
  
      logging.basicConfig(filename='{}'.format(logfile), level=logging.INFO)
      logger = logging.getLogger('')
      logger.addHandler(logging.StreamHandler())
      myprint = logger.info
  
      myprint('log file at: {}'.format(logfile))
      myprint('Again Hello from logger')
      return myprint
  </code></pre>