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

List method #9

Closed gareth-ib closed 6 years ago

gareth-ib commented 6 years ago
SORT_NONE = lambda rectlist: list(rectlist) # Unsorted

converts to..

$SORT_NONE = function ($rectlist) {return list($rectlist);};

which is a method in php to split an array into separate variables. like..

list( $var1, $var2 ) = [ 'first', 'second' ];

I'm not sure what it's meant to do in python

dan-da commented 6 years ago

fixed in 698ec4f56eda5bf5f17ee9a97997bc0434d200eb. thx.

btw, python doc for list() is here