pep8speaks: Hello @mrbean-bremen! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pydicom/config.py`](https://github.com/pydicom/pydicom/blob/1100467c86fa0911ecd4c9e0657bdb6cb74f632c/pydicom/config.py):

> [Line 91:74](https://github.com/pydicom/pydicom/blob/1100467c86fa0911ecd4c9e0657bdb6cb74f632c/pydicom/config.py#L91): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 92:71](https://github.com/pydicom/pydicom/blob/1100467c86fa0911ecd4c9e0657bdb6cb74f632c/pydicom/config.py#L92): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace






darcymason: > which had been discussed in #896, though with no clear conclusion, as far as I can see

Just had a quick read through that again... I thought there was more discussion about sequences (perhaps some other issue/PR?).  I personally like the empty list (and the `is_empty` concept that was discussed, which can always work), but don't have time today to properly look this through and answer.  Will look further over the weekend.
diff --git a/pydicom/config.py b/pydicom/config.py
index 00f63d5d8..421799645 100644
--- a/pydicom/config.py
+++ b/pydicom/config.py
@@ -87,9 +87,10 @@ Default ``False``
 """
 
 use_none_as_empty_text_VR_value = False
-""" If ``True``, the value of decoded empty data element is always ``None``.
-If ``False`` (the default), the value of an empty data element with
-a text VR is an empty string, for all other VRs it is also ``None``.
+""" If ``True``, the value of a decoded empty data element with
+a text VR is ``None``, otherwise (the default), it is is an empty string.
+For all other VRs the behavior does not change - the value is en empty
+list for VR 'SQ' and ``None`` for all other VRs.
 Note that the default of this value will change to ``True`` in version 2.0.
 """
 
diff --git a/pydicom/dataelem.py b/pydicom/dataelem.py
index 8dfe3e2f2..5e090ea06 100644
--- a/pydicom/dataelem.py
+++ b/pydicom/dataelem.py
@@ -48,10 +48,12 @@ def empty_value_for_VR(VR, raw=False):
 
     The behavior of this property depends on the setting of
     :attr:`config.use_none_as_empty_value`. If that is set to ``True``,
-    an empty value is always represented by ``None``, otherwise it depends
-    on `VR`. For text VRs (this includes 'AE', 'AS', 'CS', 'DA', 'DT', 'LO',
-    'LT', 'PN', 'SH', 'ST', 'TM', 'UC', 'UI', 'UR' and 'UT') an empty string
-    is used as empty value representation, for all other VRs, ``None``.
+    an empty value is represented by ``None`` (except for VR 'SQ'), otherwise
+    it depends on `VR`. For text VRs (this includes 'AE', 'AS', 'CS', 'DA',
+    'DT', 'LO', 'LT', 'PN', 'SH', 'ST', 'TM', 'UC', 'UI', 'UR' and 'UT') an
+    empty string is used as empty value representation, for all other VRs
+    except 'SQ', ``None``. For empty sequence values (VR 'SQ') an empty list
+    is used in all cases.
     Note that this is used only if decoding the element - it is always
     possible to set the value to another empty value representation,
     which will be preserved during the element object lifetime.
@@ -67,10 +69,12 @@ def empty_value_for_VR(VR, raw=False):
 
     Returns
     -------
-    str or bytes or None
+    str or bytes or None or list
         The value a data element with `VR` is assigned on decoding
         if it is empty.
     """
+    if VR == 'SQ':
+        return []
     if config.use_none_as_empty_text_VR_value:
         return None
     if VR in ('AE', 'AS', 'CS', 'DA', 'DT', 'LO', 'LT',

Empty data elements with value representation SQ are set to None
**Describe the bug**
In the current `master`, empty data elements are not read correctly from files. The attribute value is set to `None` instead of `[]`.

**Expected behavior**
Create empty list `[]` for empty sequence, i.e., a sequence with zero items.

**Steps To Reproduce**
```python
import pydicom
ds = pydicom.Dataset()
ds.AcquisitionContextSequence = []
print(ds)
ds.is_little_endian = True
ds.is_implicit_VR = True
ds.save_as('/tmp/test.dcm')

reloaded_ds = pydicom.dcmread('/tmp/test.dcm', force=True)
print(reloaded_ds)
```
This prints:
```
(0040, 0555)  Acquisition Context Sequence   0 item(s) ----
...
TypeError: With tag (0040, 0555) got exception: object of type 'NoneType' has no len()
Traceback (most recent call last):
  File "/private/tmp/pydicom/pydicom/tag.py", line 30, in tag_in_exception
    yield
  File "/private/tmp/pydicom/pydicom/dataset.py", line 1599, in _pretty_str
    len(data_element.value)))
TypeError: object of type 'NoneType' has no len()
```

**Your environment**
```
Darwin-18.6.0-x86_64-i386-64bit
Python  3.7.3 (default, Mar 27 2019, 09:23:15)
[Clang 10.0.1 (clang-1001.0.46.3)]
pydicom  1.4.0.dev0
```
diff --git a/pydicom/tests/test_dataelem.py b/pydicom/tests/test_dataelem.py
index 5ff1611f0..f03e7f47d 100644
--- a/pydicom/tests/test_dataelem.py
+++ b/pydicom/tests/test_dataelem.py
@@ -503,6 +503,23 @@ class TestDataElement(object):
             check_empty_binary_element(MultiValue(int, []))
             check_empty_binary_element(None)
 
+    def test_empty_sequence_is_handled_as_array(self):
+        ds = Dataset()
+        ds.AcquisitionContextSequence = []
+        elem = ds['AcquisitionContextSequence']
+        assert bool(elem.value) is False
+        assert 0 == elem.VM
+        assert elem.value == []
+
+        fp = DicomBytesIO()
+        fp.is_little_endian = True
+        fp.is_implicit_VR = True
+        filewriter.write_dataset(fp, ds)
+        ds_read = dcmread(fp, force=True)
+        elem = ds_read['AcquisitionContextSequence']
+        assert 0 == elem.VM
+        assert elem.value == []
+
 
 class TestRawDataElement(object):
     """Tests for dataelem.RawDataElement."""

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov
apt-get update apt-get install -y gcc
3.6
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
coverage==6.2
importlib-metadata==4.8.3
iniconfig==1.1.1
packaging==21.3
pluggy==1.0.0
py==1.11.0
-e git+https://github.com/pydicom/pydicom.git@ee775c8a137cd8e0b69b46dc24c23648c31fe34c#egg=pydicom
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
tomli==1.2.3
typing_extensions==4.1.1
zipp==3.6.0

name: pydicom
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - coverage==6.2
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - zipp==3.6.0
prefix: /opt/conda/envs/pydicom

pydicom/tests/test_dataelem.py::TestDataElement::test_empty_sequence_is_handled_as_array
pydicom/tests/test_dataelem.py::TestDataElement::test_VM_1 pydicom/tests/test_dataelem.py::TestDataElement::test_VM_2 pydicom/tests/test_dataelem.py::TestDataElement::test_DSFloat_conversion pydicom/tests/test_dataelem.py::TestDataElement::test_backslash pydicom/tests/test_dataelem.py::TestDataElement::test_UID pydicom/tests/test_dataelem.py::TestDataElement::test_keyword pydicom/tests/test_dataelem.py::TestDataElement::test_retired pydicom/tests/test_dataelem.py::TestDataElement::test_description_group_length pydicom/tests/test_dataelem.py::TestDataElement::test_description_unknown_private pydicom/tests/test_dataelem.py::TestDataElement::test_description_unknown pydicom/tests/test_dataelem.py::TestDataElement::test_equality_standard_element pydicom/tests/test_dataelem.py::TestDataElement::test_equality_private_element pydicom/tests/test_dataelem.py::TestDataElement::test_equality_sequence_element pydicom/tests/test_dataelem.py::TestDataElement::test_equality_not_rlement pydicom/tests/test_dataelem.py::TestDataElement::test_equality_inheritance pydicom/tests/test_dataelem.py::TestDataElement::test_equality_class_members pydicom/tests/test_dataelem.py::TestDataElement::test_inequality_standard pydicom/tests/test_dataelem.py::TestDataElement::test_inequality_sequence pydicom/tests/test_dataelem.py::TestDataElement::test_hash pydicom/tests/test_dataelem.py::TestDataElement::test_repeater_str pydicom/tests/test_dataelem.py::TestDataElement::test_str_no_vr pydicom/tests/test_dataelem.py::TestDataElement::test_repr_seq pydicom/tests/test_dataelem.py::TestDataElement::test_getitem_raises pydicom/tests/test_dataelem.py::TestDataElement::test_repval_large_elem pydicom/tests/test_dataelem.py::TestDataElement::test_repval_large_vm pydicom/tests/test_dataelem.py::TestDataElement::test_repval_strange_type pydicom/tests/test_dataelem.py::TestDataElement::test_private_tag_in_repeater_range pydicom/tests/test_dataelem.py::TestDataElement::test_private_repeater_tag pydicom/tests/test_dataelem.py::TestDataElement::test_known_tags_with_UN_VR pydicom/tests/test_dataelem.py::TestDataElement::test_unknown_tags_with_UN_VR pydicom/tests/test_dataelem.py::TestDataElement::test_tag_with_long_value_UN_VR pydicom/tests/test_dataelem.py::TestDataElement::test_empty_text_values[True-None] pydicom/tests/test_dataelem.py::TestDataElement::test_empty_text_values[False-] pydicom/tests/test_dataelem.py::TestDataElement::test_empty_binary_values pydicom/tests/test_dataelem.py::TestRawDataElement::test_key_error pydicom/tests/test_dataelem.py::TestRawDataElement::test_valid_tag pydicom/tests/test_dataelem.py::TestRawDataElement::test_data_element_without_encoding pydicom/tests/test_dataelem.py::TestRawDataElement::test_unknown_vr
pydicom/dataelem.py pydicom/config.py
pydicom/dataelem.py pydicom/config.py