Every line of 'python list extend' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
379 def extend(self, values): 380 """Append all values to the end. 381 382 If any of the values are present, ValueError will 383 be raised and none of the values will be appended. 384 385 Args: 386 values (Iterable): Values to append 387 Raises: 388 ValueError: If any values are already present or there are duplicates 389 in the passed values. 390 TypeError: If any of the values aren't hashable. 391 """ 392 self._extend(values)
341 def append_or_extend_list(lst, value): 342 if value is None: 343 return 344 elif isinstance(value, list): 345 lst.extend(value) 346 else: 347 lst.append(value)
48 def extend(self, space, w_other): 49 self._items_w.extend(space.listview(w_other))
981 def LIST_APPEND(f, *ignored): 982 w = f.popvalue() 983 v = f.popvalue() 984 f.space.call_method(v, 'append', w)
368 def append(self, value): 369 """Append value to the end. 370 371 Args: 372 value: Value to append 373 Raises: 374 ValueError: If value alread in self 375 TypeError: If value isn't hashable 376 """ 377 self._append(value)