@@ -242,19 +242,21 @@ pub(super) mod types {
242242 }
243243
244244 impl Constructor for PyBaseExceptionGroup {
245- type Args = FuncArgs ;
245+ type Args = crate :: function :: PosArgs ;
246246
247247 fn slot_new ( cls : PyTypeRef , args : FuncArgs , vm : & VirtualMachine ) -> PyResult {
248+ let args: Self :: Args = args. bind ( vm) ?;
249+ let args = args. into_vec ( ) ;
248250 // Validate exactly 2 positional arguments
249- if args. args . len ( ) != 2 {
251+ if args. len ( ) != 2 {
250252 return Err ( vm. new_type_error ( format ! (
251253 "BaseExceptionGroup.__new__() takes exactly 2 positional arguments ({} given)" ,
252- args. args . len( )
254+ args. len( )
253255 ) ) ) ;
254256 }
255257
256258 // Validate message is str
257- let message = args. args [ 0 ] . clone ( ) ;
259+ let message = args[ 0 ] . clone ( ) ;
258260 if !message. fast_isinstance ( vm. ctx . types . str_type ) {
259261 return Err ( vm. new_type_error ( format ! (
260262 "argument 1 must be str, not {}" ,
@@ -263,7 +265,7 @@ pub(super) mod types {
263265 }
264266
265267 // Validate exceptions is a sequence (not set or None)
266- let exceptions_arg = & args. args [ 1 ] ;
268+ let exceptions_arg = & args[ 1 ] ;
267269
268270 // Check for set/frozenset (not a sequence - unordered)
269271 if exceptions_arg. fast_isinstance ( vm. ctx . types . set_type )
@@ -343,7 +345,7 @@ pub(super) mod types {
343345 . map ( Into :: into)
344346 }
345347
346- fn py_new ( _cls : & Py < PyType > , _args : FuncArgs , _vm : & VirtualMachine ) -> PyResult < Self > {
348+ fn py_new ( _cls : & Py < PyType > , _args : Self :: Args , _vm : & VirtualMachine ) -> PyResult < Self > {
347349 unimplemented ! ( "use slot_new" )
348350 }
349351 }
0 commit comments