title: Python literally ghosts a line and skips calling a function
body: <p>I know this might not make much sense. There is a function that is calling another function which should call <code>selenium.webdriver.Chrome().get('some_website')</code>, here's a simplified version of the code(which works perfectly fine):</p>
  <pre><code>from selenium.webdriver import Chrome
  
  
  def func1(driver, url):
      driver.get(url)
  
  
  def func2():
      driver = Chrome()
      func1(driver, 'https://stackoverflow.com/questions/ask')
  
  
  if __name__ == '__main__':
      func2()
  </code></pre>
  <p>Because most probably this going to be met with skepticism, I made a gif showing this weird phenomenon:</p>
  <p><a href="https://i.stack.imgur.com/99YmB.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/99YmB.gif" alt="wtf" /></a></p>
  <p>and here's the problematic code which shouldn't be, it's crystal clear there is something odd here, and i tried the following btw:</p>
  <ul>
  <li>tried switching the interpreter to python3.7</li>
  <li>reinstalled selenium</li>
  <li>ran the code from the terminal</li>
  <li>created a virtual environment and ran the code</li>
  </ul>
  <p>And all of the above led to the same outcome</p>
  <pre><code>from selenium.webdriver import Chrome
  from lxml import html
  import time
  
  
  def get_table_id(website):
      &quot;&quot;&quot;
      Get table html id value.
      Args:
          website: url containing supported domains.
  
      Returns:
          website respective table id.
      &quot;&quot;&quot;
      if 'free-proxy.cz' in website:
          return 'proxy_list'
      if 'proxyrack' in website:
          return 'proxy_table'
      raise ValueError(f'Unsupported website {website}')
  
  
  def scrape_page(driver, page, wait_time=0):
      &quot;&quot;&quot;
      Scrape a page from the following websites:
      - http://free-proxy.cz/en/proxylist/main/
      - https://www.proxyrack.com/free-proxy-list/
      Args:
          driver: selenium.webdriver class
          page: url.
          wait_time: seconds to wait for page load.
  
      Yields:
          dictionary per scraped ip address.
      &quot;&quot;&quot;
      driver.get(page)
      content = driver.page_source
      if wait_time:
          time.sleep(wait_time)
      tree = html.fromstring(content)
      columns = [
          tree.xpath(f'//*[@id=&quot;proxy_list&quot;]/tbody//tr//td[{i}]//text()')
          for i in range(1, 12)
      ]
      columns = [
          [item for item in row if 'adsbygoogle' not in item] for row in columns[:3]
      ]
      if 'proxyrack' not in page:
          columns[0] = [columns[0][i] for i in range(1, len(columns[0]), 2)]
      assert (
          len(set(len(item) for item in columns)) == 1
      ), f'row length mismatch \n{columns}'
      for row in zip(*columns):
          yield dict(zip(('ip_address', 'port', 'protocol'), row))
  
  
  def scrape_pr_pages(total_pages=765):
      driver = Chrome()
      scrape_page(driver, 'http://free-proxy.cz/en/', 15)  # ?????
      driver.find_element_by_xpath(
          '//*[@id=&quot;dynatable-pagination-links-proxy_table&quot;]/li[8]/a'
      ).click()
      time.sleep(2)
      print(driver.page_source)
  
  
  if __name__ == '__main__':
      scrape_pr_pages()
  </code></pre>