Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (4 votes)
154 views

PDF Python 3 Object Oriented Programming 3rd Edition Dusty Phillips [Dusty Phillips] download

Oriented

Uploaded by

gantsarbazeg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
154 views

PDF Python 3 Object Oriented Programming 3rd Edition Dusty Phillips [Dusty Phillips] download

Oriented

Uploaded by

gantsarbazeg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Download the Full Version of textbook for Fast Typing at textbookfull.

com

Python 3 Object Oriented Programming 3rd Edition


Dusty Phillips [Dusty Phillips]

https://textbookfull.com/product/python-3-object-oriented-
programming-3rd-edition-dusty-phillips-dusty-phillips/

OR CLICK BUTTON

DOWNLOAD NOW

Download More textbook Instantly Today - Get Yours Now at textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Swift 3 Object Oriented Programming Gaston C. Hillar

https://textbookfull.com/product/swift-3-object-oriented-programming-
gaston-c-hillar/

textboxfull.com

Deep Learning in Python An Object Oriented Programming 1st


Edition Hong M. Lei [Lei

https://textbookfull.com/product/deep-learning-in-python-an-object-
oriented-programming-1st-edition-hong-m-lei-lei/

textboxfull.com

Android Programming The Big Nerd Ranch Guide 2nd Edition


Bill Phillips

https://textbookfull.com/product/android-programming-the-big-nerd-
ranch-guide-2nd-edition-bill-phillips/

textboxfull.com

Programming In C Object Oriented Features 1st Edition


Laxmisha Rai

https://textbookfull.com/product/programming-in-c-object-oriented-
features-1st-edition-laxmisha-rai/

textboxfull.com
Surgical Instrumentation Nancymarie Phillips

https://textbookfull.com/product/surgical-instrumentation-nancymarie-
phillips/

textboxfull.com

Astrophysics For Dummies Cynthia Phillips

https://textbookfull.com/product/astrophysics-for-dummies-cynthia-
phillips/

textboxfull.com

C++ Programming: An Object-Oriented Approach, 1e ISE


Behrouz A. Forouzan

https://textbookfull.com/product/c-programming-an-object-oriented-
approach-1e-ise-behrouz-a-forouzan/

textboxfull.com

The American Challenge Reader Michael Phillips

https://textbookfull.com/product/the-american-challenge-reader-
michael-phillips/

textboxfull.com

Object Oriented Programming with SIMOTION Fundamentals


Program Examples and Software Concepts According to IEC
61131 3 1st Edition Michael Braun
https://textbookfull.com/product/object-oriented-programming-with-
simotion-fundamentals-program-examples-and-software-concepts-
according-to-iec-61131-3-1st-edition-michael-braun/
textboxfull.com
Python 3 Object-Oriented Programming
Third Edition

Build robust and maintainable software with object-oriented design


patterns in Python 3.8

Dusty Phillips
BIRMINGHAM - MUMBAI
Python 3 Object-Oriented
Programming Third Edition
Copyright © 2018 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any
form or by any means, without the prior written permission of the publisher, except in the case of brief
quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information
presented. However, the information contained in this book is sold without warranty, either express or implied.
Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages
caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products
mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the
accuracy of this information.

Commissioning Editor: Richa Tripathi


Acquisition Editor: Chaitanya Nair
Content Development Editor: Rohit Kumar Singh
Technical Editor: Ketan Kamble
Copy Editor: Safis Editing
Project Coordinator: Vaidehi Sawant
Proofreader: Safis Editing
Indexer: Mariammal Chettiyar
Graphics: Alishon Mendonsa
Production Coordinator: Aparna Bhagat

First published: July 2010


Second edition: August 2015
Third edition: October 2018

Production reference: 2051118

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.

ISBN 978-1-78961-585-2

www.packt.com
mapt.io

Mapt is an online digital library that gives you full access to over
5,000 books and videos, as well as industry leading tools to help you
plan your personal development and advance your career. For more
information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical
eBooks and Videos from over 4,000 industry professionals

Improve your learning with Skill Plans built especially for you

Get a free eBook or video every month

Mapt is fully searchable

Copy and paste, print, and bookmark content


Packt.com
Did you know that Packt offers eBook versions of every book
published, with PDF and ePub files available? You can upgrade to the
eBook version at www.packt.com and as a print book customer, you are
entitled to a discount on the eBook copy. Get in touch with us at
customercare@packtpub.com for more details.

At www.packt.com, you can also read a collection of free technical


articles, sign up for a range of free newsletters, and receive
exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Dusty Phillips is a Canadian software developer and author
currently living in New Brunswick. He has been active in the open
source community for two decades and has been programming in
Python for nearly as long. He holds a master's degree in computer
science and has worked for Facebook, the United Nations, and
several start-ups. He's currently researching privacy-preserving
technology at beanstalk.network.

Python 3 Object-Oriented Programming was his first book. He has


also written Creating Apps in Kivy, and self-published Hacking
Happy, a journey to mental wellness for the technically inclined. A
work of fiction is coming as well, so stay tuned!
About the reviewers
Yogendra Sharma is a developer with experience of the
architecture, design, and development of scalable and distributed
applications. He was awarded a bachelor's degree from Rajasthan
Technical University in computer science. With a core interest in
microservices and Spring, he also has hands-on experience
technologies such as AWS Cloud, Python, J2EE, Node.js, JavaScript,
Angular, MongoDB, and Docker. Currently, he works as an IoT and
cloud architect at Intelizign Engineering Services, Pune.

Josh Smith has been coding professionally in Python, JavaScript,


and C# for over 5 years, but has loved programming since learning
Pascal over 20 years ago. Python is his default language for personal
and professional projects. He believes code should be simple, goal-
oriented, and maintainable. Josh works in data automation and lives
in St. Louis, Missouri, with his wife and two children.
Packt is searching for authors
like you
If you're interested in becoming an author for Packt, please visit autho
rs.packtpub.com and apply today. We have worked with thousands of

developers and tech professionals, just like you, to help them share
their insight with the global tech community. You can make a
general application, apply for a specific hot topic that we are
recruiting an author for, or submit your own idea.
Table of Contents
Title Page

Copyright and Credits

Python 3 Object-Oriented Programming Third Edition

Packt Upsell

Why subscribe?

Packt.com

Contributors

About the author

About the reviewers

Packt is searching for authors like you


Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Conventions used

Get in touch

Reviews

1. Object-Oriented Design

Introducing object-oriented

Objects and classes

Specifying attributes and behaviors

Data describes objects

Behaviors are actions


Hiding details and creating the public interface

Composition

Inheritance

Inheritance provides abstraction

Multiple inheritance

Case study

Exercises
Summary

2. Objects in Python

Creating Python classes

Adding attributes

Making it do something

Talking to yourself

More arguments

Initializing the object

Explaining yourself

Modules and packages

Organizing modules

Absolute imports

Relative imports

Organizing module content

Who can access my data?

Third-party libraries

Case study

Exercises

Summary

3. When Objects Are Alike

Basic inheritance

Extending built-ins

Overriding and super


Multiple inheritance

The diamond problem


Different sets of arguments

Polymorphism
Abstract base classes

Using an abstract base class


Creating an abstract base class

Demystifying the magic


Case study

Exercises
Summary

4. Expecting the Unexpected


Raising exceptions
Raising an exception
The effects of an exception

Handling exceptions
The exception hierarchy

Defining our own exceptions


Case study

Exercises
Summary

5. When to Use Object-Oriented Programming


Treat objects as objects

Adding behaviors to class data with properties


Properties in detail

Decorators – another way to create properties


Deciding when to use properties

Manager objects
Removing duplicate code

In practice
Case study

Exercises
Summary

6. Python Data Structures


Empty objects

Tuples and named tuples


Named tuples

Dataclasses
Dictionaries

Dictionary use cases


Using defaultdict

Counter
Lists

Sorting lists
Sets

Extending built-in functions


Case study

Exercises
Summary
7. Python Object-Oriented Shortcuts
Python built-in functions

The len() function


Reversed

Enumerate
File I/O
Placing it in context

An alternative to method overloading


Default arguments
Variable argument lists
Unpacking arguments

Functions are objects too


Using functions as attributes
Callable objects
Case study

Exercises
Summary
8. Strings and Serialization
Strings

String manipulation
String formatting
Escaping braces
f-strings can contain Python code

Making it look right


Custom formatters
The format method
Strings are Unicode

Converting bytes to text


Converting text to bytes
Mutable byte strings
Regular expressions

Matching patterns
Matching a selection of characters
Escaping characters
Matching multiple characters

Grouping patterns together


Getting information from regular expressions
Making repeated regular expressions efficient
Filesystem paths

Serializing objects
Customizing pickles
Serializing web objects

Case study
Exercises
Summary
9. The Iterator Pattern

Design patterns in brief


Iterators
The iterator protocol
Comprehensions

List comprehensions
Set and dictionary comprehensions
Generator expressions
Generators

Yield items from another iterable


Coroutines
Back to log parsing
Closing coroutines and throwing exceptions

The relationship between coroutines, generators, and functions


Case study
Exercises
Summary

10. Python Design Patterns I


The decorator pattern
A decorator example
Decorators in Python

The observer pattern


An observer example
The strategy pattern
A strategy example

Strategy in Python
The state pattern
A state example
State versus strategy

State transition as coroutines


The singleton pattern
Singleton implementation
Module variables can mimic singletons

The template pattern


A template example
Exercises
Summary

11. Python Design Patterns II


The adapter pattern
The facade pattern
The flyweight pattern

The command pattern


The abstract factory pattern
The composite pattern
Exercises

Summary
12. Testing Object-Oriented Programs
Why test?
Test-driven development

Unit testing
Assertion methods
Reducing boilerplate and cleaning up
Organizing and running tests

Ignoring broken tests


Testing with pytest
One way to do setup and cleanup
A completely different way to set up variables

Skipping tests with pytest


Imitating expensive objects
How much testing is enough?
Case study

Implementing it
Exercises
Summary
13. Concurrency

Threads
The many problems with threads
Shared memory
The global interpreter lock

Thread overhead
Multiprocessing
Multiprocessing pools
Queues

The problems with multiprocessing


Futures

AsyncIO

AsyncIO in action
Reading an AsyncIO Future

AsyncIO for networking

Using executors to wrap blocking code


Streams

Executors
AsyncIO clients

Case study

Exercises
Summary

Other Books You May Enjoy

Leave a review - let other readers know what you think


Preface
This book introduces the terminology of the object-oriented
paradigm. It focuses on object-oriented design with step-by-step
examples. It guides us from simple inheritance, one of the most
useful tools in the object-oriented programmer's toolbox, through
exception handling to design patterns, an object-oriented way of
looking at object-oriented concepts.

Along the way, we'll learn how to integrate the object-oriented and
the not-so-object-oriented aspects of the Python programming
language. We will learn the complexities of string and file
manipulation, emphasizing the difference between binary and textual
data.

We'll then cover the joys of unit testing, using not one, but two unit
testing frameworks. Finally, we'll explore, through Python's various
concurrency paradigms, how to make objects work well together at
the same time.

Each chapter includes relevant examples and a case study that


collects the chapter's contents into a working (if not complete)
program.
Who this book is for
This book specifically targets people who are new to object-oriented
programming. It assumes you have basic Python skills. You'll learn
object-oriented principles in depth. It is particularly useful for system
administrators who have used Python as a glue language and would
like to improve their programming skills.

Alternatively, if you are familiar with object-oriented programming in


other languages, then this book will help you understand the
idiomatic ways to apply your knowledge in the Python ecosystem.
What this book covers
This book is loosely divided into four major parts. In the first four
chapters, we will dive into the formal principles of object-oriented
programming and how Python leverages them. In Chapter 5, When to
Use Object-Oriented Programming, through Chapter 8, Strings and
Serialization, we will cover some of Python's idiosyncratic
applications of these principles by learning how they are applied to a
variety of Python's built-in functions. Chapter 9, The Iterator Pattern,
through Chapter 11, Python Design Patterns II, cover design patterns,
and the final two chapters discuss two bonus topics related to
Python programming that may be of interest.

, Object-Oriented Design, covers important object-oriented


Chapter 1

concepts. It deals mainly with terminology such as abstraction,


classes, encapsulation, and inheritance. We also briefly look at UML
to model our classes and objects.

, Objects in Python, discusses classes and objects as they are


Chapter 2

used in Python. We will learn about attributes and behaviors of


Python objects, and the organization of classes into packages and
modules. Lastly, we will see how to protect our data.

, When Objects Are Alike, gives us a more in-depth look into


Chapter 3

inheritance. It covers multiple inheritance and shows us how to


extend built-in. This chapter also covers how polymorphism and
duck typing work in Python.

, Expecting the Unexpected, looks into exceptions and


Chapter 4

exception handling. We will learn how to create our own exceptions


and how to use exceptions for program flow control.

, When to Use Object-Oriented Programming, deals with


Chapter 5

creating and using objects. We will see how to wrap data using
properties and restrict data access. This chapter also discusses the
DRY principle and how not to repeat code.

, Python Data Structures, covers the object-oriented features


Chapter 6

of Python's built-in classes. We'll cover tuples, dictionaries, lists, and


sets, as well as a few more advanced collections. We'll also see how
to extend these standard objects.

, Python Object-Oriented Shortcuts, as the name suggests,


Chapter 7

deals with time-savers in Python. We will look at many useful built-in


functions, such as method overloading using default arguments.
We'll also see that functions themselves are objects and how this is
useful.

, Strings and Serialization, looks at strings, files, and


Chapter 8

formatting. We'll discuss the difference between strings, bytes, and


byte arrays, as well as various ways to serialize textual, object, and
binary data to several canonical representations.

, The Iterator Pattern, introduces the concept of design


Chapter 9

patterns and covers Python's iconic implementation of the iterator


pattern. We'll learn about list, set, and dictionary comprehensions.
We'll also demystify generators and coroutines.

, Python Design Patterns I, covers several design patterns,


Chapter 10
including the decorator, observer, strategy, state, singleton, and
template patterns. Each pattern is discussed with suitable examples
and programs implemented in Python.

, Python Design Patterns II, wraps up our discussion of


Chapter 11

design patterns with coverage of the adapter, facade, flyweight,


command, abstract, and composite patterns. More examples of how
idiomatic Python code differs from canonical implementations are
provided.

, Testing Object-Oriented Programs, opens with why testing


Chapter 12

is so important in Python applications. It focuses on test-driven


development and introduces two different testing suites: unittest and
py.test. Finally, it discusses mocking test objects and code coverage.

, Concurrency, is a whirlwind tour of Python's support (and


Chapter 13

lack thereof) of concurrency patterns. It discusses threads,


multiprocessing, futures, and the modern AsyncIO library.
To get the most out of this
book
All the examples in this book rely on the Python 3 interpreter. Make
sure you are not using Python 2.7 or earlier. At the time of writing,
Python 3.7 was the latest release of Python. Many examples will
work on earlier revisions of Python 3, but you'll likely experience a
lot of frustration if you're using anything older than 3.5.

All of the examples should run on any operating system supported


by Python. If this is not the case, please report it as a bug.

Some of the examples need a working internet connection. You'll


probably want to have one of these for extracurricular research and
debugging anyway!

In addition, some of the examples in this book rely on third-party


libraries that do not ship with Python. They are introduced within the
book at the time they are used, so you do not need to install them in
advance.
Download the example code
files
You can download the example code files for this book from your
account at www.packt.com. If you purchased this book elsewhere, you
can visit www.packt.com/support and register to have the files emailed
directly to you.

You can download the code files by following these steps:

1. Log in or register at www.packt.com.


2. Select the SUPPORT tab.
3. Click on Code Downloads & Errata.
4. Enter the name of the book in the Search box and follow the
onscreen instructions.

Once the file is downloaded, please make sure that you unzip or
extract the folder using the latest version of:

WinRAR/7-Zip for Windows


Zipeg/iZip/UnRarX for Mac
7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://githu

. In case
b.com/PacktPublishing/Python-3-Object-Oriented-Programming-Third-Edition

there's an update to the code, it will be updated on the existing


GitHub repository.

We also have other code bundles from our rich catalog of books and
videos available at https://github.com/PacktPublishing/. Check them out!
Conventions used
There are a number of text conventions used throughout this book.

: Indicates code words in text, database table names, folder


CodeInText

names, filenames, file extensions, pathnames, dummy URLs, user


input, and Twitter handles. Here is an example: "Mount the
downloaded WebStorm-10*.dmg disk image file as another disk in your
system."

A block of code is set as follows:


class Point: def __init__(self, x=0, y=0): self.move(x, y)

When we wish to draw your attention to a particular part of a code


block, the relevant lines or items are set in bold:
import database
db = database.Database()
# Do queries on db

Any command-line input or output is written as follows:


>>> print(secret_string._SecretString__plain_string)
ACME: Top Secret

Bold: Indicates a new term, an important word, or words that you


see onscreen. For example, words in menus or dialog boxes appear
in the text like this. Here is an example: "Most object-oriented
programming languages have the concept of a constructor."
Warnings or important notes appear like this.

Tips and tricks appear like this.


Get in touch
Feedback from our readers is always welcome.

General feedback: Email feedback@packtpub.com and mention the book


title in the subject of your message. If you have questions about any
aspect of this book, please email us at questions@packtpub.com.

Errata: Although we have taken every care to ensure the accuracy


of our content, mistakes do happen. If you have found a mistake in
this book, we would be grateful if you would report this to us. Please
visit www.packt.com/submit-errata, selecting your book, clicking on the
Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any
form on the Internet, we would be grateful if you would provide us
with the location address or website name. Please contact us at
copyright@packt.com with a link to the material.

If you are interested in becoming an author: If there is a topic


that you have expertise in and you are interested in either writing or
contributing to a book, please visit authors.packtpub.com.
Reviews
Please leave a review. Once you have read and used this book, why
not leave a review on the site that you purchased it from? Potential
readers can then see and use your unbiased opinion to make
purchase decisions, we at Packt can understand what you think
about our products, and our authors can see your feedback on their
book. Thank you!

For more information about Packt, please visit packt.com .


Another Random Scribd Document
with Unrelated Content
It was not merely the absence of Königsmark, who was on a
visit to the riotous court of Augustus of Saxony, which had scared
her spirit; the reports which were made to her of his conversation
there gave fierceness to her resentment, and called into existence
that desire of vengeance which she accomplished, but without
profiting by the wickedness.
There was no more welcome guest at Dresden than Königsmark.
An individual, so gallant of bearing, handsome of feature, easy of
principle, and lively of speech, was sure to be warmly welcomed at
that dissolute court. He played deeply, and whatever sums he might
lose, he never lost his temper. He drank as deeply as he played, and
he then became as loquacious as Cassio, but more given to slander.
He spoke ill of others out of mere thoughtlessness, or at times out of
mere vanity. He possessed not what Swift calls the ‘lower prudence’
of discretion. His vanity, and the stories to which it prompted him,
seemed to amuse and interest the idle and scandalous court where
he was so welcome a guest.
He kept the illustriously wicked company there in an
uninterrupted ecstacy by the tales he told, and the point he gave to
them, of the chief personages of the Court of Hanover. He retailed
anecdotes of the Elector and his son, George Louis, and warmly-
tinted stories of the shameless mistresses of that exemplary parent,
and no less exemplary child. He did not spare even the Electress
Sophia; but she was, after all, too respectable for Königsmark to be
able to make of her a subject of ridicule. This subject he found in
ladies of smaller virtue and less merit generally. But every word he
uttered, in sarcastic description of the life, character, and behaviour
of the favourites of the Elector of Hanover and his son, found its
way, with no loss of pungency on the road, to the ears of those
persons whom the report was most likely to offend. His warm
advocacy of Sophia Dorothea, expressed at the table of Augustus of
Saxony, was only an additional offence; and George Louis was
taught to think that Count Königsmark had no right to ask, with
Pierre, ‘May not a man wish his friend’s wife well, and no harm
done?’
The count returned to Hanover soon after Sophia Dorothea had
arrived there, subsequent to her painful visit to the little court of her
ducal parents at Zell. Königsmark, who had entered the Saxon
service, returned to Hanover to complete the form of withdrawal
from service in the Hanoverian army. It is alleged that Sophia
Dorothea, otherwise friendless, entreated him to procure her an
asylum, or to protect her in her flight to the court of her kinsman,
Duke Anton Ulrich, at Wolfenbüttel. The duke is reported to have
been willing to receive her. Other reports state that the princess was
more than willing to fly with Königsmark to Paris! Out of all such
rumours there is this certainty, that on Sunday, the 1st of July 1694
(George Louis being then in Berlin), Königsmark found a letter in
pencil on a table in the sitting-room of his house in Hanover. It was
to this effect: ‘To-night, after ten o’clock, the Princess Sophia
Dorothea will expect Count Königsmark.’ He recognised the hand of
the princess. All that afternoon he was busy writing. His secretary
and servants thought his manner strange. He went out soon after
ten, unattended. He was in a light, simple, summer-dress. He went
on his way to the palace, crossed the threshold, and never was seen
outside it again.
The note was a forged document, confessedly by the Countess
von Platen, when confession came too late for the repair of evil
which could not be undone. Nevertheless, the count, on presenting
himself to Mademoiselle Knesebeck, the lady of honour to the
princess, was admitted to the presence of the latter. This indiscreet
step was productive of terrible consequences to all the three who
were present. The count, on being asked to explain the reason of his
seeking an interview with the princess at an advanced hour of the
evening, produced the note of invitation, which Sophia Dorothea at
once pronounced to be a forgery. Had they then separated little of ill
consequence might have followed. The most discreet of the three,
and the most perplexed at the ‘situation,’ was the lady of honour.
The ‘Memoirs’ which bear her name, and which describe this scene,
present to us a woman of some weakness, yet one not wanting in
discernment.
Sophia Dorothea, it would seem, could dwell upon no subject
but that of her domestic troubles, the cruel neglect of her husband,
and her desire to find somewhere the refuge from persecution which
had been denied to her in her old home at Zell. More dangerous
topics could not have been treated by two such persons. The count,
it is affirmed, was the first to suggest that Paris would afford her
such a refuge, and that he should be but too happy to be permitted
to give her such protection as she could derive from his escort
thither. This was probably rather hinted than suggested; but
however that may be, only one course should have followed even a
distant hint leading to so unwarrantable an end. The interview
should have been brought to a close. It was still continued,
nevertheless, to the annoyance, if not scandal, of the faithful
Knesebeck, whose fears may have received some little solace on
hearing her mistress reiterate her desire to find at least a temporary
home at the court of her cousin, Duke Anton Ulrich of Wolfenbüttel.
While this discussion was proceeding, the Countess von Platen
was by no means idle. She had watched the count to the bower into
which she had sent him by the employment of a false lure, and she
thereupon hastened to the Elector to communicate what she termed
her discovery. Ernest Augustus, albeit waxing old, was by no means
infirm of judgment. If Königsmark was then in the chamber of his
daughter-in-law, he refused to see in the fact anything more serious
than its own impropriety. That, however, was crime enough to
warrant the arrest which the countess solicited. The old Elector
yielded to all she asked, except credence of her assurance that
Sophia Dorothea must be as guilty as Königsmark was presuming.
He would consent to nothing further than the arrest of him who was
guilty of the presumption; and the method of this arrest he left to
the conduct of the countess, who urgently solicited it as a favour,
and with solicitation of such earnestness that the old Elector affected
to be jealous of the interest she took in such a case, and added
playfully the expression of his opinion, that, angry as she seemed to
be with the count, he was too handsome a man to be likely to meet
with ill-treatment at her hands.
Armed with this permission, she proceeded to the body of
soldiers or watch for the night, and exhibiting her written warrant for
what she demanded, requested that a guard might be given to her,
for a purpose which she would explain to them. Some four or five
men of this household body were told off, and these were conducted
by her to a large apartment, called the Hall of Knights, through
which Königsmark must pass, as he had not yet quitted the
princess’s chamber.
They were then informed that their office was to arrest a
criminal, whose person was described to them, of whose safe
custody the Elector was so desirous that he would rather that such
criminal should be slain than that he should escape. They were
accordingly instructed to use their weapons if he should resist; and
as their courage had been heightened by the double bribe of much
wine and a shower of gold pieces, they expressed their willingness
to execute her bidding, and only too well showed by their
subsequent act the sincerity of their expression.
At length Königsmark appeared, coming from the princess’s
apartment. It was now midnight. He entered the Ritter Hall,
unsuspecting the fate before him. In this hall was a huge, square,
ponderous stove, looking like a mausoleum, silent and cold. It
reached from floor to roof, and, hidden by one of its sides, the guard
awaited the coming of the count. He approached the spot, passed it,
was seized from behind, and he immediately drew his sword to
defend himself from attack. His enemies gave him but scant
opportunity to assail them in his own defence, and after a few wild
passes with his weapon, he was struck down by the spear, or old-
fashioned battle-axe, of one of the guards, and when he fell there
were three wounds in him, out of any one of which life might find
passage.
On feeling himself grow faint, he—and in this case, like a true
and gallant man—thought of the lady and her reputation. The last
words he uttered were, ‘Spare the innocent princess!’ soon after
which he expired; but not before, as is reported by those who love
to dwell minutely on subjects of horror, not before the Countess von
Platen had set her foot triumphantly upon his bloody face.
Such is the German detail of this assassination. It is added, that
it gave extreme annoyance to the Elector, to whom it was
immediately communicated; that the body was forthwith consigned
to a secure resting-place, and covered with lime; and that the whole
bloody drama was enacted without any one being aware of what
was going on, save the actors themselves.
In Cramer’s ‘Memoirs of the Countess of Königsmark,’ the fate of
the count is told upon the alleged evidence of a so-called eye-
witness. It differs in several respects from other accounts, but is
clear and simple in its details. It is to the following effect:—
‘Bernhard Zayer, a native of Heidelberg, in the Palatinate, a wax-
image maker and artist in lacquer-work, was engaged by the
Electoral Princess to teach her his art. Being, on this account,
continually in the princess’s apartment, he had frequently seen
Count Königsmark there, who looked on while the princess worked.
He once learned in confidence, from the Electoral Princess’s groom
of the chambers, that the Electoral Prince was displeased about the
count, and had sworn to break his neck, which Bernhard revealed to
the princess, who answered:—“Let them attack Königsmark: he
knows how to defend himself.” Some time afterwards there was an
opera, but the princess was unwell and kept her bed. The opera
began, and as the count was absent as well as the princess, first a
page and then the hoff-fourier were sent out for intelligence. The
hoff-fourier came back running, and whispered to the Electoral
Prince, and then to his highness the Elector. But the Electoral Prince
went away from the opera with the hoff-fourier. Now Bernhard saw
all this and knew what it meant, and as he knew the count was with
the princess, he left the opera secretly, to warn her; and as he went
in at the door, the other door was opened, and two masked persons
rushed in, one exclaiming, “So! then I find you!” The count, who was
sitting on the bed, with his back to the door by which the two
entered, started up, and whipped out his sword, saying, “Who can
say anything unbecoming of me?” The princess, clasping her hands,
said “I, a princess, am I not allowed to converse with a gentleman?”
But the masks, without listening to reason, slashed and stabbed
away at the count. But he pressed so upon both, that the Electoral
Prince unmasked, and begged for his life, while the hoff-fourier
came behind the count, and run him through between the ribs with
his sword, so that he fell, saying, “You are murderers, before God
and man, who do me wrong!” But they both of them gave him more
wounds, so that he lay as dead. Bernhard, seeing all this, hid himself
behind the door of the other room.’
Bernhard was subsequently sent by the princess to spy out what
they would do with Königsmark.
‘When the count was in the vault, he came a little to himself, and
spoke:—“You take a guiltless man’s life. On that I’ll die, but do not
let me perish like a dog, in my blood and my sins. Grant me a priest,
for my soul’s sake.” Then the Electoral Prince went out, and the
fourier remained alone with him. Then was a strange parson
fetched, and a strange executioner, and the fourier fetched a great
chair. And when the count had confessed, he was so weak that three
or four of them lifted him into the chair; and there in the prince’s
presence was his head laid at his feet. And they had tools with them,
and they dug a hole in the right corner of the vault, and there they
laid him, and there he must be to be found. When all was over, this
Bernhard slipped away from the castle; and indeed Counsellor
Lucius, who was a friend of the princess’s, sent him some of his
livery to save him; for they sought him in all corners, because they
had seen him in the room during the affray.... And what Bernhard
Zayer saw in the vault, he saw through a crack.’
Clear as this narrative is in its details, it is contradictory and rests
on small basis of truth. The Electoral Prince was undoubtedly absent
on the night Königsmark was murdered.
The Countess Aurora of Königsmark has left a statement of her
brother’s intimacy with the princess, in which the innocence of the
latter is maintained, but his imprudence acknowledged. The
statement referred to explains the guilty nature of the intercourse
kept up between Königsmark and the Countess von Platen. It is
written in terms of extreme indelicacy. We may add that the faithful
von Knesebeck, on whose character no one ever cast an imputation,
in her examination before the judges, argued the innocence of her
accused mistress upon grounds the nature of which cannot even be
alluded to. The princess, it is clear, had urged Königsmark to renew
his interrupted intrigue with von Platen, out of dread that the latter,
taking the princess as the cause of the intercourse having been
broken off, should work a revenge, which she did not hesitate to
menace, upon the princess herself.
The details of all the stories are marked by great improbability,
and they have not been substantiated by the alleged death-bed
confessions of the Countess von Platen, and Baumain, one of the
guards—the two criminals having, without so intending it, confessed
to the same clergyman, a minister named Kramer! Though these
confessions are spoken of, and are even cited by German authors,
their authenticity cannot be warranted. At all events, there is an
English version of the details of this murder given by Horace
Walpole; and as that lively writer founded his lugubrious details upon
authority which he deemed could not be gainsaid, they may fairly
find a place, by way of supplement to the foreign version.
‘Königsmark’s vanity,’ says Walpole, ‘the beauty of the Electoral
Princess, and the neglect under which he found her, encouraged his
presumptions to make his addresses to her, not covertly, and she,
though believed not to have transgressed her duty, did receive them
too indiscreetly. The old Elector flamed at the insolence of so
stigmatised a pretender, and ordered him to quit his dominions the
next day. This princess, surrounded by women too closely connected
with her husband and consequently enemies of the lady they
injured, was persuaded by them to suffer the count to kiss her hand,
before his abrupt departure; and he was actually introduced by them
into her bedchamber the next morning before she rose. From that
moment he disappeared, nor was it known what became of him, till
on the death of George I., on his son, the new King’s first journey to
Hanover, some alterations in the palace being ordered by him, the
body of Königsmark was discovered under the floor of the Electoral
Princess’s dressing-room—the count having probably been strangled
there, the instant he left her, and his body secreted. The discovery
was hushed up. George II. (the son of Sophia Dorothea) entrusted
the secret to his wife, Queen Caroline, who told it to my father; but
the King was too tender of the honour of his mother to utter it to his
mistress; nor did Lady Suffolk ever hear of it, till I informed her of it
several years afterwards. The disappearance of the count made his
murder suspected, and various reports of the discovery of his body
have of late years been spread, but not with the authentic
circumstances.’
To turn to the German sources of information: we are told by
these, that after the departure of Königsmark from the chamber of
the princess, she was engaged in arranging her papers, and in
securing her jewels, preparatory, as she hoped, to her anticipated
removal to the Court of Wolfenbüttel. Königsmark must have been
murdered and the body made away with silently and swiftly, for not
a dweller in the palace was disturbed by the doing of this bloody
deed. All signs of its having been done had been so effaced that no
trace of it was left to attract notice in the early morning. On that
next morning the count’s servants were not troubled at his absence;
such an occurrence was not unusual. When it was prolonged and
enquiry became necessary, nothing could be learnt of him. Every
soul in the palace was silent, designedly or through ignorance.
Rumour, of course, was busy and full of confidence in what it put
forth. George Louis himself said that the gay count would reappear,
perhaps, when least expected. The tremendous secret was faithfully
kept by the few who knew the truth; and when speculation was
busiest as to the count’s whereabout, there was probably no atom of
his body left, if it be true that it had been cast into a drain and had
been consumed in slack-lime.
The princess was, for a time, kept in ignorance of the count’s
assassination; but she was perplexed by his disappearance, and
alarmed when she heard that all his papers had been seized and
conveyed to the Elector for his examination. Some notes had passed
between them: and, innocent as they were, she felt annoyed at the
thought that their existence should be known, still more that they
should be perused. To their most innocent expressions the Countess
von Platen, who examined them with the Elector, gave a most guilty
interpretation; and she so wrought upon Ernest Augustus, that he
commissioned no less a person than the Count von Platen to
interrogate the princess on the subject. She did not lack spirit; and
when the coarse-minded count began to put coarse questions to her,
as to the degree of intercourse which had existed between herself
and the count, she spiritedly remarked that he appeared to imagine
that he was examining into the conduct of his own wife; a thrust
which he repaid by bluntly informing her that whatever intercourse
may have existed, it would never be renewed, seeing that sure
intelligence had been received of Königsmark’s death.
Sophia Dorothea, shocked at this information, and at the manner
in which it was conveyed, had no friend in whom she could repose
confidence but her faithful lady-in-waiting, Fräulein von Knesebeck.
The princess could have had no more ardent defender than this
worthy attendant. But the assertions made by the latter, in favour of
the mistress whom she loved, were not at all to the taste of the
enemies of that mistress, and the speedy result was, that Fräulein
von Knesebeck was arrested and carried away to the castle of
Schartzfeld in the Hartz. She was there kept in confinement many
years; but she ultimately escaped so cleverly through the roof, by
the help of a tiler, or a friend in the likeness of a tiler, that the credit
of the success of the attempt was given by the governor of the gaol
to the demons of the adjacent mountains. She subsequently became
lady-in-waiting to Sophia Dorothea’s daughter.
Sophia Dorothea had now but one immediate earnest wish,
namely, to retire from Hanover. Already the subject of a divorce had
been mooted, but the Elector being somewhat fearful that a divorce
might affect his son’s succession to his wife’s inheritance, and even
obstruct the union of Zell with Hanover, an endeavour was made to
reconcile the antagonistic spouses, and to bury past dissensions in
oblivion.
It was previous to this attempt being entered upon, and perhaps
because it was contemplated, that the princess voluntarily
underwent a very solemn ordeal. The ceremony was as public as it
could be rendered by the presence of part of the Electoral family and
the great official dignitaries of the church and government. Before
them Sophia Dorothea partook of the sacrament, and then made
solemn protestation of her innocence, and of her unspotted faith
towards the Electoral Prince, her husband. At the termination of this
ceremony she was insulted by an incredulous smile which she saw
upon the face of Count von Platen; whereat the natural woman was
moved within her to ask him if his own excellent wife could take the
same oath, in attestation of her unbroken faithfulness to him!
The strange essay at reconciliation was marred by an attempt
made to induce the Electoral Princess to confess that she had been
guilty of sins of disobedience towards the expressed will of her
consort. All endeavour in this direction was fruitless; and though
grave men made it, it shows how very little they comprehended their
delicate mission. The princess remained fixed in her desire to
withdraw from Hanover; but when she was informed of the wound
this would be to the feelings of the Elector and Electress, and that
George Louis himself was heartily averse to it, she began to waver,
and applied to her friends at Zell, among others to Bernstorf, the
Hanoverian minister there, asking for counsel in this her great need.
Bernstorf, an ally of the von Platens, secretly advised her to
insist upon leaving Hanover. He assured her, pledging his word for
what he said, that she would find a happy asylum at Zell; that even
her father, so long estranged from her, would receive her with open
arms; and that in the adoption of such a step alone could she hope
for happiness and peace during the remainder of her life.
She was as untruthfully served by some of the ladies of her
circle, who, while professing friendship and fidelity, were really the
spies of her husband and her husband’s mistress. They were of that
class of women who were especially bred for courts and court
intrigues, and whose hopes of fortune rested upon their doing credit
to their education.
As the princess not merely insisted upon quitting Hanover, but
firmly refused to acknowledge that she had been guilty of any wrong
to her most guilty husband, a course was adopted by her enemies
which, they considered, would not merely punish her, but would
transfer her possessions to her consort, without affecting the long
projected union of Zell, after the duke’s death, with the territory of
Hanover. An accusation of adultery, even if it could be sustained, of
which there was not the shadow of a chance, might, if carried out
and followed by a divorce, in some way affect the transfer of a
dominion to Hanover, which transfer rested partly on the rights of
the wife of the Electoral Prince. A divorce might destroy the ex-
husband’s claims; but he was well-provided with lawyers to watch
and guard the case to an ultimate conclusion in his favour.
A Consistorial Court was formed, of a strangely mixed character,
for it consisted of four ecclesiastical lawyers and four civil authorities
of Hanover and Zell. It had no other authority to warrant its
proceedings than the command or sanction of the Elector, and the
consent of the Duke of Zell, whose ill-feeling towards his child
seemed to increase daily. The only charge laid against the princess
before this anomalous court was one of incompatibility of temper,
added to some little failings of character; not the most distant
allusion to serious guilt with Königsmark, or any one else, was
made. His name was never once mentioned. Her consent to live
again in Hanover and let by-gones be by-gones was indignantly
refused by her. She would never, she protested, live again among
people who had murdered the only man in the world who loved her
well enough to be a friend to her who was otherwise friendless. Her
passionate tears flowed abundantly; Fräulein von Knesebeck states
that whenever the mysterious fate of Königsmark was referred to,
the princess’s grief was so violent that it might almost lead those
who witnessed it to suspect that she took too great an interest in
the man made away with almost at her chamber-door.
The court affected to attempt an adjustment of the matter; but
as the attempt was always based on another to drag from the
princess a confession of her having, wittingly or unwittingly, given
cause of offence to her husband, she continued firmly to refuse to
place her consort in the right by doing herself and her cause
extremest wrong.
In the meantime, during an adjournment of the court, she
withdrew to Lauenau. She was prohibited from repairing to Zell, but
there was no longer any opposition made to her leaving the capital
of the Electorate. She was, however, strictly prohibited from taking
her children with her. Her parting from these was as painful a scene
as can well be imagined, for she is said to have felt that she would
never again be united with them. Her son, George Augustus, was
then ten years of age; her daughter, Sophia, was still younger. The
homage of these children was rendered to their mother long after
their hearts had ceased to pay any to their father beyond a mere
conventional respect.
In her temporary retirement at Lauenau, she was permitted to
enjoy very little repose. The friends of the Electoral Prince seem to
have been anxious lest she should publish more than was yet known
of the details of his private life. This fear alone can account for their
anxiety, or professed anxiety, for a reconciliation. The lawyers, singly
or in couples, and now and then a leash of them together, went
down to Lauenau to hold conference with her. They assailed her
socially, scripturally, legally; they pointed out how salubrious was the
discipline which subjected a wife to confess her faults. They read to
her whole chapters from Corinthians, on the duties of married ladies,
and asked her if she could be so obstinate and unorthodox as to
disregard the injunctions of St. Paul. Finally, they quoted codes and
pandects, to prove that a sentence might be pronounced against her
under contumacy, and concluded by recommending her to trust to
the mercy of the Crown Prince, if she would but cast herself upon
his honour.
They were grave men; sage, learned, experienced men; crafty,
cunning, far-seeing men; in all the circles of the empire men were
not to be found more skilled in surmounting difficulties than these
indefatigable men, who were all foiled by the simplicity and firmness
of a mere child. ‘If I am guilty,’ said she, ‘I am unworthy of the
prince: if I am innocent, he is unworthy of me!’
Here was a conclusion with which she utterly confounded the
sages. They could not gainsay it, nor refute the logic by which it was
arrived at, and which gave it force. They were ‘perplexed in the
extreme,’ but neither social experience, nor scriptural reading, nor
legal knowledge afforded them weapons wherewith to beat down
the simple defences behind which the princess had entrenched
herself. They tried repeatedly, but tried in vain. At the end of every
trial she slowly and calmly enunciated the same reply:—‘If I am
guilty I am unworthy of him: if I am innocent, he is unworthy of me!’
From this text she would not depart; nor could all the chicanery
of all the courts of Germany move her. ‘At least,’ said the luminaries
of the law, as they took their way homewards, re infecta, ‘at least
this woman may, of a surety, be convicted of obstinacy.’ We always
stigmatise as obstinate those whom we cannot convince. It is the
only, and the poor, triumph of the vanquished.
This triumph was achieved by the Consistory Court, the
members of which, unable to prove the princess guilty of crime,
were angry because she would not even confess to the commission
of a fault; that is, of such a fault as should authorise her husband,
covered with guilt triple-piled, to separate from her person, yet
maintain present and future property over her estates.
In point of fact, George Louis did not wish to be separated from
his wife. His counsel, Rath Livius, accused her, in her husband’s
name, of lack of both love and obedience towards him; of having
falsely charged him with infidelity, to his parents and her own; and
of having repeatedly refused to again live with him; for this act of
disobedience, and for no other reason, he asked the judgment of the
court. Sophia Dorothea’s own counsellors, Rudolph Thies and
Joachin von Bulow, put it to her whether she would return to her
husband or abide judgment for disobeying his repeated desire.
Nothing could move her. She despised her husband, and would
never again live under the same roof with him. Her own desire was
to live, henceforward, in seclusion—to pass the remainder of her
unhappy life in peace and humiliation.
The court came to a decision on the 28th of December, 1694.
Their judgment was, that as she refused to live with her husband,
she was guilty of desertion, and on that ground alone a decree of
separation, or divorce, was recorded. When told that she had a right
to appeal, she contemptuously refused to avail herself of it. The
terms of the sentence were extraordinary, for they amounted to a
decree of divorce without expressly mentioning the fact. The
judgment, wherein nothing was judged, conferred on the prince,
George Louis, the right of marrying again, if he should be so minded
and could find a lady willing to be won. It, however, explicitly
debarred his wife from entering into a second union. Not a word was
written down against her, alleging that she was criminal. The name
of Königsmark was not even alluded to. Notwithstanding these facts,
and that the husband was the really guilty party, while the utmost
which can be said against the princess was that she may have been
indiscreet—notwithstanding this, not only was he declared to be an
exceedingly injured individual, but the poor lady, whom he held in
his heart’s hottest hate, was deprived of her property, possession of
which was transferred to George Louis, in trust for the children; and
the princess, endowed with an annual pension of some eight or ten
thousand thalers, was condemned to close captivity in the castle of
Ahlden, near Zell, with a retinue of domestics, whose office was to
watch her actions, and a body of armed gaolers, whose only duty
was to keep the captive secure in her bonds.
Sophia Dorothea entered on her imprisonment with a calm, if
not with a cheerful heart: certainly with more placidity and true joy
than George Louis felt, surrounded by his mistresses and all the
pomp of the Electoral State. All Germany is said to have been
scandalised by the judgment delivered by the court. The illegality
and the incompetency of the court from which it emanated, were so
manifest, that the sentence was looked upon as a mere wanton
cruelty, carrying with it neither conviction nor lawful consequence.
So satisfied was the princess’s advocate on this point that he
requested her to give him a letter declaring him non-responsible for
having so far recognised the authority of the court as to have
pleaded her cause before it! What is perhaps more singular still is
the doubt which long existed whether this court ever sat at all; and
whether decree of separation or divorce was ever pronounced in the
cause of Sophia Dorothea of Zell and George Louis, Electoral Prince
of Hanover.
Horace Walpole says, on this subject: ‘I am not acquainted with
the laws of Germany relative to divorce or separation, nor do I know
or suppose that despotism and pride allow the law to insist on much
formality when a sovereign has reason or mind to get rid of his wife.
Perhaps too much difficulty in untying the Gordian knot of
matrimony, thrown in the way of an absolute prince, would be no
kindness to the ladies, but might prompt him to use a sharper
weapon, like that butchering husband, our Henry VIII. Sovereigns
who narrow or let out the law of God according to their prejudices
and passions mould their own laws, no doubt, to the standard of
their convenience. Genealogic purity of blood is the predominant
folly of Germany; and the Code of Malta seems to have more force
in the empire than the Ten Commandments. Thence was introduced
that most absurd evasion of the indissolubility of marriage, espousals
with the left hand, as if the Almighty had restrained his ordinance to
one half of a man’s person, and allowed a greater latitude to his left
side than to his right, or pronounced the former more ignoble than
the latter. The consciences both of princely and noble persons in
Germany are quieted if the more plebeian side is married to one who
would degrade the more illustrious moiety; but, as if the laws of
matrimony had no reference to the children to be thence
propagated, the children of a left-handed alliance are not entitled to
inherit. Shocking consequence of a senseless equivocation, which
only satisfies pride, not justice, and is calculated for an acquittal at
the herald’s office, not at the last tribunal.
‘Separated the Princess (Sophia) Dorothea certainly was, and
never admitted even to the nominal honours of her rank, being
thenceforward always styled the Duchess of Halle (Ahlden). Whether
divorced is problematic, at least to me; nor can I pronounce—as,
though it was generally believed, I am not certain—that George
espoused the Duchess of Kendal (Mdlle. von der Schulenburg) with
his left hand. But though German casuistry might allow a husband to
take another wife with his left hand because his legal wife had
suffered her right hand to be kissed by a gallant, even Westphalian
or Aulic counsellors could not have pronounced that such a
momentary adieu constituted adultery; and, therefore, of a formal
divorce I must doubt; and there I must leave that case of conscience
undecided until future search into the Hanoverian Chancery shall
clear up a point of little real importance.’ Coxe, in his Memoirs of
Walpole, says, on the other hand, very decidedly:—‘George I., who
never loved his wife, gave implicit credit to the account of her
infidelity, as related by his father; consented to her imprisonment,
and obtained from the ecclesiastical consistory a divorce, which was
passed on the 20th of December 1694.’
The researches into the Chancery of Hanover, which Walpole left
to posterity, appear to have been made, and the decree of the
Consistorial Court which condemned Sophia Dorothea has been
copied and published. It is quoted in the ‘Life of the Princess,’
published anonymously in 1845, and it is inserted below for the
benefit of those who like to read history by the light of documents.
It has been said that such a decree could only have been
purchased by rank bribery, which is likely enough; for the courts of
Germany were so utterly corrupt that nothing could equal them in
infamy—except the corruption which prevailed in England.
‘In the matrimonial suit of the illustrious Prince George Louis,
Crown Prince of Hanover, against his consort, the illustrious Princess
Sophia Dorothea, we, constituted president and judges of the
Matrimonial Court of the Electorate and Duchy of Brunswick-
Lunenberg, declare and pronounce judgment, after attempts have
been tried and have failed, to settle the matter amicably, and, in
accordance with the documents and verbal declarations of the
Princess, and other detailed circumstances, we agree that her
continued denial of matrimonial duty and cohabitation is well
founded, and consequently that it is to be considered as an
intentional desertion. In consequence whereof, we consider,
sentence, and declare the ties of matrimony to be entirely dissolved
and annulled. Since, in similar cases of desertion, it has been
permitted to the innocent party to re-marry, which the other is
forbidden, the same judicial power will be exercised in the present
instance in favour of his Serene Highness the Crown Prince.
‘Published in the Consistorial Court at Hanover, December 28th,
1694.
(Signed) ‘Phillip Von Busche.
Francis Eichfeld (Pastor).
Anthony George Hildberg.
Gerhardt Art.
Gustavus Molan.
Bernhard Spilken.
Erythropal.
David Rupertus.
H. L. Hattorf.’

The work from which the above document is extracted furnishes


also the following, as a copy of the letter written by the princess at
the request of the legal conductor of her case, as ‘security from
proceedings in relation to his connexion with her affairs:’—
‘As we have now, after being made acquainted with the
sentence, given it proper consideration, and resolved not to offer
any opposition to it, our solicitor must act accordingly, and is not to
act or proceed any further in this matter. For the rest, we hereby
declare that we are gratefully content with the conduct of our
aforesaid solicitor of the Court, Thies, and that by this we free him
from all responsibility regarding these transactions.
(Signed) ‘Sophia Dorothea.
‘Lauenau, December 31, 1694.’
By this last document it would seem that the Hof-Rath Thies
would have denied the competency of the court had he been
permitted to do so; and that he was so convinced of its illegality as
to require a written prohibition from asserting the same, and
acknowledgment of exemption from all responsibility, before he
would feel satisfied that he had accomplished his duty towards his
illustrious client.
Long before the case was heard, and four months previous to
the publication of the sentence of the Consistorial Court, the two
brothers, the Elector of Hanover and the Duke of Zell, had actually
agreed by an enactment that the unhappy marriage between the
cousins should be dissolved. The enactment provided for the means
whereby this end was to be achieved, and for the disposal of the
princess during the progress of the case. The anonymous author of
the biography of 1845 then proceeds to state that ‘It was therein
specified that her domestics should take a particular oath, and that
the princess should enjoy an annual income of eight thousand
thalers (exclusive of the wages of her household), to be increased
one-half on the death of her father, with a further increase of six
thousand thalers on her attaining the age of forty years. It was
provided that the castle of Ahlden should be her permanent
residence, where she was to remain well guarded. The domain of
Wilhelmsburg, near Hamburg, was, at the death of the Duke of Zell,
to descend to the prince, son of the Princess Sophia Dorothea—the
Crown Prince, however, during his own life retaining the revenues;
but should the grandson die before his father, the property would
then, on payment of a stipulated sum, be inherited by the successor
in the government of the son of the Elector. By a further
arrangement, the mother of the princess was to possess
Wienhausen, with an annual income of twelve thousand thalers,
secured on the estates of Schernebeck, Garze, and Bluettingen; the
castle at Lunenburg to be allowed as her residence from the
commencement of her widowhood.’
Never was so much care taken to secure property on one side,
and the person on the other. The contracting parties appear to have
been afraid lest the prisoner should ever have an opportunity of
appealing against the wrong of which she was made the victim; and
her strait imprisonment was but the effect of that fear. That nothing
might be neglected to make assurance doubly sure, and to deprive
her of any help she might hope hereafter to receive at the hands of
a father, whose heart might possibly be made to feel his own
injustice and his daughter’s sorrows, the Duke of Zell was induced to
promise that he would neither see nor hold communication with the
daughter he had repudiated.
During the so-called trial, at Lauenau, the princess resided in the
chief official residence in that place. At the close of the inquiry she
took a really final leave of her children—George Augustus and
Sophia Dorothea—with bitter tears, which would have been more
bitter still if she had thought that she was never again to look upon
them. She had concluded that she would have liberty to live with her
mother in Zell. She had no idea that her father had already agreed
to his brother the Elector’s desire that she should be shut up in the
castle of Ahlden. She found herself a state prisoner.
The oath to be taken by her appointed household, or rather by
the personal attendants—counts and countesses in waiting and
persons of similar rank—was stringent and illustrative of the
importance attached to the safe-keeping of the prisoner. It was to
the effect ‘that nothing should be wanting to prevent anticipated
intrigues; or for the perfect security of the place fixed as a residence
for the Princess Sophia Dorothea, in order to maintain tranquility,
and to prevent any opportunity occurring to an enemy for
undertaking or imagining anything which might cause a division in
the illustrious family.’
CHAPTER IX.
PRISON AND PALACE.

The prison of the captive Sophia Dorothea—Employment of her time—The


church of Ahlden repaired by her—Cut off from her children—Sympathy of
Ernest Augustus for his daughter-in-law—Her father’s returning affection
for her—Opening prospects of the House of Hanover—Lord Macclesfield’s
embassy to Hanover, and his right-royal reception—Description of the
Electress—Toland’s description of Prince George Louis—Magnificent
present to Lord Macclesfield—The Princess Sophia and the English liturgy
—Death of the Duke of Zell—Visit of Prince George to his captive mother
prevented.

The castle of Ahlden is situated on the small and sluggish stream, the
Aller; and seems to guard, as it once oppressed, the little village
sloping at its feet. This edifice was appointed as the prison-place of
Sophia Dorothea; and from the territory she acquired a title, that of
Duchess of Ahlden. She was mockingly called sovereign lady of a
locality where all were free but herself!
On looking over the list of the household which was formed for
the service, if the phrase be one that may be admitted, of her
captivity, the first thing which strikes us as singular is the presence
of ‘three cooks’—a triad of ‘ministers of the mouth’ for one poor
imprisoned lady!
The singularity vanishes when we find that around this encaged
duchess there circled a really extensive household, and there lived a
world of ceremony, of which no one was so much the slave as she
was. Her captivity in its commencement was decked with a certain
sort of splendour, about which she, who was its object, cared by far
the least. There was a military governor of the castle, gentlemen
and ladies in waiting—spies all. Among the honester servants of the
house were a brace of pages and as many valets, a dozen female
domestics, and fourteen footmen, who had to undergo the intense
labour of doing very little in a very lengthened space of time. To
supply the material wants of these, the three cooks, one
confectioner, a baker, and a butler, were provided. There was,
besides, a military force, consisting of infantry and artillery.
Altogether, there must have been work enough for the three cooks.
The forms of a court were long maintained, although only on a
small scale. The duchess held her little levées, and the local
authorities, clergy, and neighbouring nobility and gentry offered her
such respect as could be manifested by paying her visits on certain
appointed days. These visits, however, were always narrowly
watched by the officials, whose office lay in such service and was hid
beneath a show of duty.
The successive governors of the castle were men of note, and
their presence betokened the importance attached to the person and
safe keeping of the captive. During the first three years of her
imprisonment, the post of governor was held by the Hof Grand-
Marshal von Bothmar. He was succeeded by the Count Bergest, who
enjoyed his equivocal dignity of gaoler-governor about a quarter of a
century. During the concluding years of the imprisonment of Sophia,
her seneschal was a relative of one of her judges, Georg von
Busche.
These men behaved to their prisoner with as much courtesy as
they dared to show; nor was her captivity severe in anything but the
actual deprivation of liberty, and of all intercourse with those she
best loved, until after the first few years. The escape of Fräulein
Knesebeck from her place of confinement appears to have given the
husband of Sophia Dorothea an affectionate uneasiness, which he
evidenced by giving orders that his wife’s safe-keeping should be
maintained with greater stringency.
From the day of the issuing of that order, she was never allowed
to walk, even in the garden of the castle, without a guard. She never
rode out, or drove through the neighbouring woods, without a
strong escort. Even parts of the castle were prohibited from being
intruded upon by her; and so much severity was shown in this
respect, that when, on one occasion, a fire broke out in the edifice,
to escape from which she must have traversed a gallery which she
was forbidden to pass, she stood short of the proscribed limit, her
jewel-box in her arms, and herself in almost speechless terror, but
refusing to advance beyond the prohibited line until permission
reached her from the proper authority.
On such a prisoner time must have hung especially heavy. She
had, however, many resources, and every hour, with her, had its
occupation. She was the land-steward of her little ducal estate, and
performed all the duties of that office. She kept a diary of her
thoughts as well as actions; and if this be extant it would be well
worthy of being published. The one which has been put forth as hers
is a poor work of fancy by some writer unknown, set in dramatic
scenes, and altogether to be rejected. Her correspondence, during
the period she was permitted to write, was extensive. Every day she
had interviews with, and gave instructions to, each of her servants,
from the chief of the three cooks downwards. With this, she was
personally active in charity. Finally, she was the Lady Bountiful of the
district, laying out half her income in charitable uses for the good of
her neighbours, and, as Boniface said of the good lady of Lichfield,
‘curing more people in and about the place within ten years, than
the doctors had killed in twenty; and that’s a bold word.’
There was a church in the village, which was in rather ruinous
condition when her captivity commenced; but this she put in
thorough repair, decorated it handsomely, presented it with an
organ, and was refused permission to attend there after it had been
reopened for public service. For her religious consolation a chaplain
had been provided, and she was never trusted, even under guard, to
join with the villagers in common worship in the church of the village
below. In this respect a somewhat royal etiquette was observed. The
chaplain read prayers to the garrison and household in one room, to
which the princess and her ladies listened rather than therewith
joined, placed as they were in an adjacent room, where they could
hear without being seen.
With no relative was she allowed to hold never so brief an
interview; and at last even her mother was not permitted to soften
by her presence for an hour the rigid and ceremonious captivity of
her luckless daughter. Mother and child were allowed to correspond
at stated periods, their letters passing open. The princess herself
was as much cut off from her own children as if these had been
dead and entombed. The little prince and princess were expressly
ordered to utterly forget that they had a mother—her very name on
their lips would have been condemned as a grievous fault. The boy,
George Augustus, was in many points of character similar to his
father, and, accordingly, being commanded to forget his mother, he
obstinately bore her in memory; and when he was told that he
would never have an opportunity afforded him to see her, mentally
resolved to make one for himself.
It is but justice to the old Elector to say that in his advanced
years, when pleasant sins were no longer profitable to him, he gave
them up; and when the youngest of his mistresses had ceased to be
attractive, he began to think such appendages little worth the
hanging on to his Electoral dignity. For, ceasing to love and live with
his ‘favourites,’ he did not the more respect, or hold closer
intercourse with, his wife—a course about which the Electress
Sophia troubled herself very little.
Ernest Augustus, when he ceased to be under the influence of
the disgraced Countess von Platen, began to be sensible of some
sympathy for his daughter-in-law, Sophia. He softened in some
degree the rigour of her imprisonment and corresponded with her by
letter; a correspondence which inspired her with hope that her
freedom might result from it. This hope was, however, frustrated by
the death of Ernest Augustus, on the 20th of January 1698. From
that time the rigour of her imprisonment was increased fourfold.
If the heart of her old father-in-law began to incline towards her
as he increased in years, it is not to be wondered at that the heart
of her aged father melted towards her as time began to press
heavily upon him. But it was the weakest of hearts allied to the
weakest of minds. In the comfortlessness of his great age he sought
to be comforted by loving her whom he had insanely and unnaturally
oppressed—the sole child of his heart and house. In his weakness he
addressed himself to that tool of Hanover at Zell, the minister
Bernstorf; and that individual so terrified the poor old man by details
of the ill consequences which might ensue if the wrath of the new
Elector, George Louis, were aroused by the interference of the Duke
of Zell in matters which concerned the Elector and his wife, that the
old man, feeble in mind and body, yielded, and for a time at least
left his daughter to her fate. He thought to compensate for the
wrong which he inflicted on her under the impulse of his evil genius,
Bernstorf, by adding a codicil to his will.
By this codicil he bequeathed to the daughter whom he had
wronged all that it was in his power to leave, in jewels, moneys, and
lands; but liberty he could not give her, and so his love could do little
more than try to lighten the fetters which he had aided to put on.
But there was a short-lived joy in store, both for child and parents.
The fetters were to be cast aside for a brief season, and the poor
captive was to enjoy an hour of home, of love, and of liberty.
The last year of the seventeenth century (1700) brought with it
an accession of greatness to the Electoral family of Hanover,
inasmuch as in that year a bill was introduced into parliament, and
accepted by that body, which fixed the succession to the crown of
England after the Princess Anne, and in default of such princess
dying without heirs of her own body, in the person of Sophia of
Hanover. William III. had been very desirous for the introduction of
this bill; but under various pretexts it had been deferred, the
commonest business being allowed to take precedence of it, until
the century had nearly expired. The limitations to the royal action,
which formed a part of the bill as recommended in the report of the
committee, were little to the King’s taste; for they not only affected
his employment of foreign troops in England, but shackled his own
free and frequent departures from the kingdom. It was imagined by
many that these limitations were designed by the leaders in the
cabinet, in order to raise disputes between the two houses, by which
the bill might be lost. Such is Burnet’s report; and he sarcastically
adds thereto, that when much time had been spent in preliminaries,
and it was necessary to come to the nomination of the person who
should be named presumptive heir next to Queen Anne, the office of
doing so was confided to ‘Sir John Bowles, who was then disordered
in his senses, and soon after quite lost them.’ ‘He was,’ says Burnet,
‘set on by the party to be the first that should name the Electress-
dowager of Brunswick, which seemed done to make it less serious
when moved by such a person.’ So that the solemn question of
naming the heir to a throne was entrusted to an idiot, who, by the
forms of the house, was appointed chairman of the committee for
the conduct of the bill. Burnet adds, that the ‘thing,’ as he calls it,
was ‘still put off for many weeks at every time that it was called for;
the motion was entertained with coldness, which served to heighten
the jealousy; the committee once or twice sat upon it, but all the
members ran out of the house with so much indecency that the
contrivers seemed ashamed of this management; there were seldom
fifty or sixty at the committee, yet in conclusion it passed, and was
sent up to the Lords.’ Great opposition was expected from the peers,
and many of their lordships designedly absented themselves from
the discussion. The opposition was slight, and confined to the
Marquis of Normanby, who spoke, and the Lords Huntingdon,
Plymouth, Guildford, and Jefferies, who protested, against the bill.
Burnet affirms, that those who wished well to the Act were glad to
have it passed any way, and so would not examine the limitations
that were in it, and which they thought might be considered
afterwards. ‘We reckoned it,’ says Burnet, ‘a great point carried that
we had now a law on our side for a Protestant successor.’ The law
was stoutly protested against by the Duchess of Savoy, grand-
daughter of Charles I. The protest did not trouble the King, who
despatched the Act to the Electress-dowager, and the Garter to her
son, by the hands of the Earl of Macclesfield.
The earl was a fitting bearer of so costly and significant a
present. He had been attached to the service of the mother of
Sophia, and was highly esteemed by the Electress-dowager herself.
The earl had no especial commission beyond that which enjoined
him to deliver the Act, nor was he dignified by any official
appellation. He was neither ambassador, legate, plenipotentiary, nor
envoy. He had with him, however, a most splendid suite; which was
in some respects strangely constituted, for among its members was
the famous Toland, whose book in support of rationality as applied
to religion had been publicly burnt by the hangman, in Ireland.
The welcome to this body of gentlemen was right royal. It may
be said that the Electoral family had neither cared for the dignity
now rendered probable for them, nor in any way toiled or intrigued
to bring it within their grasp; but it is certain that their joy was great
when the Earl of Macclesfield appeared on the frontier of the
Electorate with the Act in one hand and the Garter in the other. He
and his suite were met there with a welcome of extraordinary
magnificence, betokening ample appreciation of the double gift he
brought with him. He himself seemed elevated by his mission, for he
was in his general deportment little distinguished by courtly manners
or by ceremonious bearing; but it was observed that, on this
occasion, nothing could have been more becoming than the way in
which he acquitted himself of an office which brought a whole family
within view of succession to a royal and powerful throne.
On reaching the confines of the Electorate, the members of the
deputation from England were received by personages of the highest
official rank, who not only escorted them to the capital, but treated
them on the way with a liberality so profuse as to be the wonder of
all beholders. They were not allowed to disburse a farthing from
their own purses; all they thought fit to order was paid for by the
Electoral government, by whose orders they were lodged in the most
commodious palace in Hanover, where as much homage was paid
them as if each man had been a Kaiser in his own person. The
Hanoverian gratitude went so far, that not only were the ambassador
and suite treated as favoured guests, and those not alone of the
princess but of the people—the latter being commanded to refrain
from taking payment from any of them for any article of refreshment
they required—but for many days all English travellers visiting the
city were made equally free of its caravansaries, and were permitted
to enjoy all that the inns could afford without being required to pay
for the enjoyment.
The delicate treatment of the Electoral government extended
even to the servants of the earl and his suite. It was thought that to
require them to dine upon the fragments of their master’s banquets
would be derogatory to the splendour of the hospitality of the House
of Hanover and an insult to the domestics who followed in the train
of the earl. The government accordingly disbursed half-a-crown a
day to each liveried follower, and considered such a ‘composition’ as
glorious to the reputation of the Electoral house. The menials were
even emancipated from service during the sojourn of the deputation
in Hanover, and the Elector’s numerous servants waited upon the
English visitors zealously throughout the day, but with most
splendour in the morning; then, they were to be seen hurrying to
the bed-rooms of the different members of the suite, bearing with
them silver coffee and tea pots, and other requisites for breakfast,
which meal appears to have been lazily indulged in—as if the
legation had been habitually wont to ‘make a night of it’—in bed.
And there was a good deal of hard drinking on these occasions, but
all at the expense of the husband of Sophia Dorothea, who, in her
castle of Ahlden, was not even aware of that increase of honour
which had fallen upon her consort, and in which she had a right to
share.
For those who were, the next day, ill or indolent, there were the
ponderous state coaches to carry them whithersoever they would
go. The most gorgeous of the fêtes given on this occasion was on
the evening of the day on which the Act was solemnly presented to
the Electress-dowager. Hanover, famous as it was for its balls, had
never seen so glorious a Terpsichorean festival as marked this
particular night. At the balls in the old Elector’s time Sophia
Dorothea used to shine, first in beauty and in grace; but now her
place was ill supplied by the not fair and quite graceless
Mademoiselle von der Schulenburg. The supper which followed was
Olympian in its profusion, wit, and magnificence. This was at a time
when to be sober was to be respectable, but when to be drunk was
not to be ungentlemanly. Consequently we find Toland, who wrote
an account of the achievements of the day, congratulating himself
and readers by stating that, although it was to be expected that in
so large and so jovial a party some would be found even more
ecstatic than the occasion and the company warranted, yet that, in
truth, the number of those who were guilty of excess was but small.
Even Lord Mohun kept himself sober, and to the end was able to
converse as clearly and intelligibly as Lord Saye and Sele, and his
friend ‘my Lord Tunbridge.’
This day of presentation of the Act, and of the festival in honour
of it, was one of the greatest days which Hanover had ever seen.
Speaking of the mother-in-law of Sophia Dorothea, Toland says:
—‘The Electress is three-and-seventy years old, which she bears so
wonderfully well, that, had I not many vouchers, I should scarce
dare venture to relate it. She has ever enjoyed extraordinary health,
which keeps her still very vigorous, of a cheerful countenance, and a
merry disposition. She steps as firm and erect as any young lady,
has not one wrinkle in her face, which is still very agreeable, nor one
tooth out of her head, and reads without spectacles, as I have often
seen her do, letters of a small character, in the dusk of the evening.
She is as great a writer as our late queen (Mary), and you cannot
turn yourself in the palace without meeting some monument of her
industry, all the chairs of the presence-chamber being wrought with
her own hands. The ornaments of the altar in the electoral chapel
are all of her work. She bestowed the same favour on the Protestant
abbey, or college, of Lockurn, with a thousand other instances, fitter
for your lady to know than for yourself. She is the most constant and
greatest walker I ever knew, never missing a day, if it proves fair, for
one or two hours, and often more, in the fine garden at
Herrnhausen. She perfectly tires all those of her court who attend
her in that exercise but such as have the honour to be entertained
by her in discourse. She has been long admired by all the learned
world as a woman of incomparable knowledge in divinity, philosophy,
history, and the subjects of all sorts of books, of which she has read
a prodigious quantity. She speaks five languages so well, that by her
accent it might be a dispute which of them was her first. They are
Low Dutch, German, French, Italian, and English, which last she
speaks as truly and easily as any native; which to me is a matter of
amazement, whatever advantages she might have in her youth by
the conversation of her mother; for though the late king’s (William’s)
mother was likewise an Englishwoman, of the same royal family;
though he had been more than once in England before the
Revolution; though he was married there, and his court continually
full of many of that nation, yet he could never conquer his foreign
accent. But, indeed, the Electress is so entirely English in her person,
in her behaviour, in her humour, and in all her inclinations, that
naturally she could not miss of anything that peculiarly belongs to
our land. She was ever glad to see Englishmen, long before the Act
of Succession. She professes to admire our form of government, and
understands it mighty well, yet she asks so many questions about
families, customs, laws, and the like, as sufficiently demonstrate her
profound wisdom and experience. She has a deep veneration for the
Church of England, without losing affection or charity for any other
sort of Protestants, and appears charmed with the moderate temper
of our present bishops and other of our learned clergy, especially for
their approbation of the liberty allowed by law to Protestant
Dissenters. She is adored for her goodness among the inhabitants of
the country, and gains the hearts of all strangers by her unparalleled
affability. No distinction is ever made in her court concerning the
parties into which Englishmen are divided, and whereof they carry
the effects and impressions with them whithersoever they go, which
makes others sometimes uneasy as well as themselves. There it is
enough that you are an Englishman; nor can you ever discover by
your treatment which are better liked, the Whigs or the Tories.
These are the instructions given to all the servants, and they take
care to execute them with the utmost exactness. I was the first who
had the honour of kneeling and kissing her hand on account of the
Act of Succession; and she said, among other discourse, that she
was afraid the nation had already repented their choice of an old
woman, but that she hoped none of her posterity would give her any
reasons to grow weary of their dominion. I answered, that the
English had too well considered what they did to change their minds
so soon, and they still remembered they were never so happy as
when they were last under a woman’s government. Since that time,
sir,’ adds the courtly but unorthodox Toland to the ‘Minister of State
in Holland,’ to whom his letter is addressed, ‘we have a further
confirmation of this truth by the glorious administration of Queen
Anne.’
The record would be imperfect if it were not accompanied by
another ‘counterfeit presentment,’ that of her son, Prince George
Louis, the husband of Sophia Dorothea. Toland describes him as ‘a
proper, middle-sized, well-proportioned man, of a genteel address,
and good appearance;’ but he adds, that his Highness ‘is reserved,
and therefore speaks little, but judiciously.’ ‘He is not to be
exceeded,’ says Toland, ‘in his zeal against the intended universal
monarchy of France, and so is most hearty for the common cause of
Europe,’ for the very good reason, that therein ‘his own is so
necessarily involved.’ Toland adds, that George Louis understood the
constitution of England better than any ‘foreigner’ he had ever met
with; a very safe remark, for our constitution was ill understood
abroad; and even had the theoretical knowledge of George Louis
been ever so correct, his practice with our constitution betrayed such
ignorance that Toland’s assertion may be taken only for what it is
worth. ‘Though,’ says the writer just named, ‘though he be well
versed in the art of war, and of invincible courage, having often
exposed his person to great dangers in Hungary, in the Morea, on
the Rhine, and in Flanders, yet he is naturally of peaceable
inclination; which mixture of qualities is agreed, by the experience of
all ages, to make the best and most glorious princes. He is a perfect
man of business, exactly regular in the economy of his revenues’
(which he never was of those of England, seeing that he outran his
liberal allowance, and coolly asked the parliament to pay his debts),
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like