Update nest.py

eliminated some code to work in 2.6