title: python args not working unless it has a position reference
body: <pre><code>def test_stats(team, *args):
  
      if not args:
            [do some stuff]
      else:
  
          team_fixtures = (Fixtures.objects.filter(home_team=team_details.id) | Fixtures.objects.filter(away_team=team_details.id))/
  .filter(fixture_datetime__lt=datetime.now()).filter(fixture_datetime__year=args[0])
  </code></pre>
  
  <p>And for reference sake - args is:</p>
  
  <pre><code>date_year = datetime.now().year
  </code></pre>
  
  <p>for this query to work i need to reference args as </p>
  
  <pre><code>.filter(fixture_datetime__year=args[0])
  </code></pre>
  
  <p>because if I use</p>
  
  <pre><code>.filter(fixture_datetime__year=args)
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>int() argument must be a string, a bytes-like object or a number, not
    'tuple'</p>
  </blockquote>
  
  <p>I understand that it thinks it's a tuple even though it's only one value but when I do the following in terminal</p>
  
  <pre><code>type(date_year)
  </code></pre>
  
  <p>I get class  back.</p>
  
  <p>Why do I have to reference position here when it looks to be just one value returning?</p>