Skip to content

Markdown forces an empty line at the end #54

@hynek

Description

@hynek

Hi, I've finally come around to try it!

Looks promising, but the following doesn't work:

```python
>>> import svc_reg
>>> import uuid

>>> reg = svc_reg.Registry()

>>> reg.register_factory(uuid.UUID, uuid.uuid4)
>>> reg.register_value(str, "Hello World")
```

Gives me:

Example at /Users/hynek/FOSS/svc-reg/README.md, line 41, column 1 did not evaluate as expected:
Expected:
   ```
Got nothing

README.md:41: SybilFailure

While the following does (empty last line):

```python
>>> import svc_reg
>>> import uuid

>>> reg = svc_reg.Registry()

>>> reg.register_factory(uuid.UUID, uuid.uuid4)
>>> reg.register_value(str, "Hello World")

```

This is not just about None results.

```python
>>> container = svc_reg.Container(reg)

>>> u = container.get(uuid.UUID)
>>> u
UUID('...')
>>> # Calling get() again returns the SAME UUID instance!
>>> # Good for DB connections, bad for UUIDs.
>>> u is container.get(uuid.UUID)
True
>>> container.get(str)
'Hello World'
```

gives me:

Example at /Users/hynek/FOSS/svc-reg/README.md, line 62, column 1 did not evaluate as expected:
Expected:
    'Hello World'
    ```
Got:
    'Hello World'

README.md:62: SybilFailure

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions