title: neighbors=G.neighbors_iter AttributeError: 'Graph' object has no attribute 'neighbors_iter'
body: <pre><code>import networkx as nx 
  def core_number(G):
      nodes=list(G.nodes())
      if G.is_multigraph():
          raise nx.NetworkXError('MultiGraph and MultiDiGraph types not supported.')
  
      if G.number_of_selfloops()&gt;0:
          raise nx.NetworkXError('Input graph has self loops; the core number is not defined.','Consider using G.remove_edges_from(G.selfloop_edges()).')
  
      if G.is_directed():
          def neighbors(v):
              return itertools.chain.from_iterable([G.predecessors_iter(v), G.successors_iter(v)])
      else:
          neighbors=G.neighbors_iter
      return neighbors
  </code></pre>
  
  <p>I am working with python3 and networkx-2.0. The above code give the following error:</p>
  
  <pre><code>   neighbors=G.neighbors_iter()
     AttributeError: 'Graph' object has no attribute 'neighbors_iter'
  </code></pre>