docstr: If the original list is empty, treat is just as if it's undefined.
  This is a change in behavior from version 2
  (where the input list would just be completly ignored), because
  in version 3 the difference between an uninitialized and empty list
  is not obvious to the user.
docstr_tok: ["If","the","original","list","is","empty",",","treat","is","just","as","if","it","'s","undefined",".","This","is","a","change","in","behavior","from","version","2","(","where","the","input","list","would","just","be","completly","ignored",")",",","because","in","version","3","the","difference","between","an","uninitialized","and","empty","list","is","not","obvious","to","the","user","."]
code: def test_update_initialized_empty_list_with_list(self):
      """
      If the original list is empty, treat is just as if it's undefined.
      This is a change in behavior from version 2
      (where the input list would just be completly ignored), because
      in version 3 the difference between an uninitialized and empty list
      is not obvious to the user.
      """
      layout = go.Layout(annotations=[])
      layout.update(
          annotations=[
              go.layout.Annotation(text="one"),
              go.layout.Annotation(text="two"),
          ]
      )
  
      expected = {"annotations": [{"text": "one"}, {"text": "two"}]}
  
      self.assertEqual(len(layout.annotations), 2)
      self.assertEqual(layout.to_plotly_json(), expected)
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_update.py
imports: from unittest import skip
  import plotly.graph_objs
  from plotly.graph_objs import Data, Figure, Layout, Line, Scatter, scatter, XAxis
  from plotly.tests.utils import strip_dict_params
  from unittest import TestCase
label_desc: Use image node_id 8 for calling the TestUpdateMethod obj's underlying member method code with example usage: obj.test_update_initialized_empty_list_with_list() without return types