@@ -743,11 +743,11 @@ private static Exception UnexpectedKeywordArgument(IDictionary<object, object> p
743743
744744 [ PythonType ]
745745 public class product : IterBase {
746- public product ( params object [ ] iterables ) {
747- InnerEnumerator = Yielder ( ArrayUtils . ConvertAll ( iterables , x => new PythonList ( PythonOps . GetEnumerator ( x ) ) ) ) ;
746+ public product ( CodeContext context , params object [ ] iterables ) {
747+ InnerEnumerator = Yielder ( ArrayUtils . ConvertAll ( iterables , x => new PythonList ( context , PythonOps . GetEnumerator ( x ) ) ) ) ;
748748 }
749749
750- public product ( [ ParamDictionary ] IDictionary < object , object > paramDict , params object [ ] iterables ) {
750+ public product ( CodeContext context , [ ParamDictionary ] IDictionary < object , object > paramDict , params object [ ] iterables ) {
751751 object repeat ;
752752 int iRepeat = 1 ;
753753 if ( paramDict . TryGetValue ( "repeat" , out repeat ) ) {
@@ -768,7 +768,7 @@ public product([ParamDictionary]IDictionary<object, object> paramDict, params ob
768768 PythonList [ ] finalIterables = new PythonList [ iterables . Length * iRepeat ] ;
769769 for ( int i = 0 ; i < iRepeat ; i ++ ) {
770770 for ( int j = 0 ; j < iterables . Length ; j ++ ) {
771- finalIterables [ i * iterables . Length + j ] = new PythonList ( iterables [ j ] ) ;
771+ finalIterables [ i * iterables . Length + j ] = new PythonList ( context , iterables [ j ] ) ;
772772 }
773773 }
774774 InnerEnumerator = Yielder ( finalIterables ) ;
@@ -823,8 +823,8 @@ private IEnumerator<object> Yielder(PythonList[] iterables) {
823823 public class combinations : IterBase {
824824 private readonly PythonList _data ;
825825
826- public combinations ( object iterable , object r ) {
827- _data = new PythonList ( iterable ) ;
826+ public combinations ( CodeContext context , object iterable , object r ) {
827+ _data = new PythonList ( context , iterable ) ;
828828
829829 InnerEnumerator = Yielder ( GetR ( r , _data ) ) ;
830830 }
@@ -893,8 +893,8 @@ private IEnumerator<object> Yielder(int r) {
893893 public class combinations_with_replacement : IterBase {
894894 private readonly PythonList _data ;
895895
896- public combinations_with_replacement ( object iterable , object r ) {
897- _data = new PythonList ( iterable ) ;
896+ public combinations_with_replacement ( CodeContext context , object iterable , object r ) {
897+ _data = new PythonList ( context , iterable ) ;
898898
899899 InnerEnumerator = Yielder ( GetR ( r , _data ) ) ;
900900 }
@@ -962,14 +962,14 @@ private IEnumerator<object> Yielder(int r) {
962962 public class permutations : IterBase {
963963 private readonly PythonList _data ;
964964
965- public permutations ( object iterable ) {
966- _data = new PythonList ( iterable ) ;
965+ public permutations ( CodeContext context , object iterable ) {
966+ _data = new PythonList ( context , iterable ) ;
967967
968968 InnerEnumerator = Yielder ( _data . Count ) ;
969969 }
970970
971- public permutations ( object iterable , object r ) {
972- _data = new PythonList ( iterable ) ;
971+ public permutations ( CodeContext context , object iterable , object r ) {
972+ _data = new PythonList ( context , iterable ) ;
973973
974974 InnerEnumerator = Yielder ( GetR ( r , _data ) ) ;
975975 }
@@ -1160,7 +1160,7 @@ private IEnumerator<object> Yielder(CodeContext context, object function, IEnume
11601160 objargs [ i ] = args [ i ] ;
11611161 }
11621162 } else {
1163- PythonList argsList = new PythonList ( PythonOps . GetEnumerator ( iter . Current ) ) ;
1163+ PythonList argsList = new PythonList ( context , PythonOps . GetEnumerator ( iter . Current ) ) ;
11641164 objargs = ArrayUtils . ToArray ( argsList ) ;
11651165 }
11661166
0 commit comments