dan-da / py2php

py2php is a utility that will auto-translate python code into PHP code.
GNU General Public License v2.0
98 stars 32 forks source link

foreach #11

Closed gareth-ib closed 6 years ago

gareth-ib commented 6 years ago
for key, binfac in self._empty_bins.items():

makes

foreach( pyjslib_foreachlist( $this->_empty_bins->items() ) as list ( $key, $binfac ) ) {

but should be

foreach( $this->_empty_bins as $key => $binfac ) {
dan-da commented 6 years ago

nice catch. I made a fix in cf1758a9142600c5bd5da7814275a53d2c379b9b that detects this case.