100% found this document useful (3 votes)
63 views

Learning Python 4th edition Mark Lutz download

The document provides information about the fourth edition of 'Learning Python' by Mark Lutz, including details on its publication and various formats available for download. It also lists other related Python books by the same author and includes a table of contents outlining the chapters and topics covered in the book. The content focuses on Python programming concepts, types, operations, and practical applications for users at different skill levels.

Uploaded by

opareranaee7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
63 views

Learning Python 4th edition Mark Lutz download

The document provides information about the fourth edition of 'Learning Python' by Mark Lutz, including details on its publication and various formats available for download. It also lists other related Python books by the same author and includes a table of contents outlining the chapters and topics covered in the book. The content focuses on Python programming concepts, types, operations, and practical applications for users at different skill levels.

Uploaded by

opareranaee7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Learning Python 4th edition Mark Lutz download

https://ebookname.com/product/learning-python-4th-edition-mark-
lutz/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Learning Python Third Edition Mark Lutz

https://ebookname.com/product/learning-python-third-edition-mark-
lutz/

Programming Python 4th Edition Mark Lutz

https://ebookname.com/product/programming-python-4th-edition-
mark-lutz/

Python Pocket Reference 4th ed Edition Mark Lutz

https://ebookname.com/product/python-pocket-reference-4th-ed-
edition-mark-lutz/

Success and Failure in Public Governance A Comparative


Analysis New Horizons in Public Policy First Edition
Mark Bovens

https://ebookname.com/product/success-and-failure-in-public-
governance-a-comparative-analysis-new-horizons-in-public-policy-
first-edition-mark-bovens/
Working with Ethnicity Race and Culture in Mental
Health A Handbook for Practitioners 1st Edition Hari
Sewell

https://ebookname.com/product/working-with-ethnicity-race-and-
culture-in-mental-health-a-handbook-for-practitioners-1st-
edition-hari-sewell/

Analytical Characterization of Aluminum Steel and


Superalloys 1st Edition D. Scott Mackenzie

https://ebookname.com/product/analytical-characterization-of-
aluminum-steel-and-superalloys-1st-edition-d-scott-mackenzie/

An Introduction to Forensic Linguistics 1st Edition


Malcolm Coulthard

https://ebookname.com/product/an-introduction-to-forensic-
linguistics-1st-edition-malcolm-coulthard/

A History of Russian Thought 1st Edition William


Leatherbarrow

https://ebookname.com/product/a-history-of-russian-thought-1st-
edition-william-leatherbarrow/

Water distribution systems 2nd Revised edition Edition


C. J. Parsloe

https://ebookname.com/product/water-distribution-systems-2nd-
revised-edition-edition-c-j-parsloe/
Operations Research 1st Edition R. Sivarethinamohan

https://ebookname.com/product/operations-research-1st-edition-r-
sivarethinamohan/
Learning Python
FOURTH EDITION

Learning Python

Mark Lutz

Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo


Learning Python, Fourth Edition
by Mark Lutz

Copyright © 2009 Mark Lutz. All rights reserved.


Printed in the United States of America.

Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.

O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (http://my.safaribooksonline.com). For more information, contact our
corporate/institutional sales department: (800) 998-9938 or [email protected].

Editor: Julie Steele Indexer: John Bickelhaupt


Production Editor: Sumita Mukherji Cover Designer: Karen Montgomery
Copyeditor: Rachel Head Interior Designer: David Futato
Production Services: Newgen North America Illustrator: Robert Romano

Printing History:
March 1999: First Edition.
December 2003: Second Edition.
October 2007: Third Edition.
September 2009: Fourth Edition.

Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. Learning Python, the image of a wood rat, and related trade dress are trademarks
of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a
trademark claim, the designations have been printed in caps or initial caps.

While every precaution has been taken in the preparation of this book, the publisher and author assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.

ISBN: 978-0-596-15806-4

[M]

1252944666
To Vera.
You are my life.
Table of Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi

Part I. Getting Started

1. A Python Q&A Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3


Why Do People Use Python? 3
Software Quality 4
Developer Productivity 5
Is Python a “Scripting Language”? 5
OK, but What’s the Downside? 7
Who Uses Python Today? 7
What Can I Do with Python? 9
Systems Programming 9
GUIs 9
Internet Scripting 10
Component Integration 10
Database Programming 11
Rapid Prototyping 11
Numeric and Scientific Programming 11
Gaming, Images, Serial Ports, XML, Robots, and More 12
How Is Python Supported? 12
What Are Python’s Technical Strengths? 13
It’s Object-Oriented 13
It’s Free 13
It’s Portable 14
It’s Powerful 15
It’s Mixable 16
It’s Easy to Use 16
It’s Easy to Learn 17
It’s Named After Monty Python 17
How Does Python Stack Up to Language X? 17

vii
Chapter Summary 18
Test Your Knowledge: Quiz 19
Test Your Knowledge: Answers 19

2. How Python Runs Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23


Introducing the Python Interpreter 23
Program Execution 24
The Programmer’s View 24
Python’s View 26
Execution Model Variations 29
Python Implementation Alternatives 29
Execution Optimization Tools 30
Frozen Binaries 32
Other Execution Options 33
Future Possibilities? 33
Chapter Summary 34
Test Your Knowledge: Quiz 34
Test Your Knowledge: Answers 34

3. How You Run Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35


The Interactive Prompt 35
Running Code Interactively 37
Why the Interactive Prompt? 38
Using the Interactive Prompt 39
System Command Lines and Files 41
A First Script 42
Running Files with Command Lines 43
Using Command Lines and Files 44
Unix Executable Scripts (#!) 46
Clicking File Icons 47
Clicking Icons on Windows 47
The input Trick 49
Other Icon-Click Limitations 50
Module Imports and Reloads 51
The Grander Module Story: Attributes 53
import and reload Usage Notes 56
Using exec to Run Module Files 57
The IDLE User Interface 58
IDLE Basics 58
Using IDLE 60
Advanced IDLE Tools 62
Other IDEs 63
Other Launch Options 64

viii | Table of Contents


Embedding Calls 64
Frozen Binary Executables 65
Text Editor Launch Options 65
Still Other Launch Options 66
Future Possibilities? 66
Which Option Should I Use? 66
Chapter Summary 68
Test Your Knowledge: Quiz 68
Test Your Knowledge: Answers 69
Test Your Knowledge: Part I Exercises 70

Part II. Types and Operations

4. Introducing Python Object Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75


Why Use Built-in Types? 76
Python’s Core Data Types 77
Numbers 78
Strings 80
Sequence Operations 80
Immutability 82
Type-Specific Methods 82
Getting Help 84
Other Ways to Code Strings 85
Pattern Matching 85
Lists 86
Sequence Operations 86
Type-Specific Operations 87
Bounds Checking 87
Nesting 88
Comprehensions 88
Dictionaries 90
Mapping Operations 90
Nesting Revisited 91
Sorting Keys: for Loops 93
Iteration and Optimization 94
Missing Keys: if Tests 95
Tuples 96
Why Tuples? 97
Files 97
Other File-Like Tools 99
Other Core Types 99
How to Break Your Code’s Flexibility 100

Table of Contents | ix
User-Defined Classes 101
And Everything Else 102
Chapter Summary 103
Test Your Knowledge: Quiz 103
Test Your Knowledge: Answers 104

5. Numeric Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105


Numeric Type Basics 105
Numeric Literals 106
Built-in Numeric Tools 108
Python Expression Operators 108
Numbers in Action 113
Variables and Basic Expressions 113
Numeric Display Formats 115
Comparisons: Normal and Chained 116
Division: Classic, Floor, and True 117
Integer Precision 121
Complex Numbers 122
Hexadecimal, Octal, and Binary Notation 122
Bitwise Operations 124
Other Built-in Numeric Tools 125
Other Numeric Types 127
Decimal Type 127
Fraction Type 129
Sets 133
Booleans 139
Numeric Extensions 140
Chapter Summary 141
Test Your Knowledge: Quiz 141
Test Your Knowledge: Answers 141

6. The Dynamic Typing Interlude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143


The Case of the Missing Declaration Statements 143
Variables, Objects, and References 144
Types Live with Objects, Not Variables 145
Objects Are Garbage-Collected 146
Shared References 148
Shared References and In-Place Changes 149
Shared References and Equality 151
Dynamic Typing Is Everywhere 152
Chapter Summary 153
Test Your Knowledge: Quiz 153
Test Your Knowledge: Answers 154

x | Table of Contents
7. Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
String Literals 157
Single- and Double-Quoted Strings Are the Same 158
Escape Sequences Represent Special Bytes 158
Raw Strings Suppress Escapes 161
Triple Quotes Code Multiline Block Strings 162
Strings in Action 163
Basic Operations 164
Indexing and Slicing 165
String Conversion Tools 169
Changing Strings 171
String Methods 172
String Method Examples: Changing Strings 174
String Method Examples: Parsing Text 176
Other Common String Methods in Action 177
The Original string Module (Gone in 3.0) 178
String Formatting Expressions 179
Advanced String Formatting Expressions 181
Dictionary-Based String Formatting Expressions 182
String Formatting Method Calls 183
The Basics 184
Adding Keys, Attributes, and Offsets 184
Adding Specific Formatting 185
Comparison to the % Formatting Expression 187
Why the New Format Method? 190
General Type Categories 193
Types Share Operation Sets by Categories 194
Mutable Types Can Be Changed In-Place 194
Chapter Summary 195
Test Your Knowledge: Quiz 195
Test Your Knowledge: Answers 196

8. Lists and Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197


Lists 197
Lists in Action 200
Basic List Operations 200
List Iteration and Comprehensions 200
Indexing, Slicing, and Matrixes 201
Changing Lists In-Place 202
Dictionaries 207
Dictionaries in Action 209
Basic Dictionary Operations 209
Changing Dictionaries In-Place 210

Table of Contents | xi
More Dictionary Methods 211
A Languages Table 212
Dictionary Usage Notes 213
Other Ways to Make Dictionaries 216
Dictionary Changes in Python 3.0 217
Chapter Summary 223
Test Your Knowledge: Quiz 224
Test Your Knowledge: Answers 224

9. Tuples, Files, and Everything Else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225


Tuples 225
Tuples in Action 227
Why Lists and Tuples? 229
Files 229
Opening Files 230
Using Files 231
Files in Action 232
Other File Tools 238
Type Categories Revisited 239
Object Flexibility 241
References Versus Copies 241
Comparisons, Equality, and Truth 244
Python 3.0 Dictionary Comparisons 246
The Meaning of True and False in Python 246
Python’s Type Hierarchies 248
Type Objects 249
Other Types in Python 250
Built-in Type Gotchas 251
Assignment Creates References, Not Copies 251
Repetition Adds One Level Deep 252
Beware of Cyclic Data Structures 252
Immutable Types Can’t Be Changed In-Place 253
Chapter Summary 253
Test Your Knowledge: Quiz 254
Test Your Knowledge: Answers 254
Test Your Knowledge: Part II Exercises 255

Part III. Statements and Syntax

10. Introducing Python Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261


Python Program Structure Revisited 261
Python’s Statements 262

xii | Table of Contents


A Tale of Two ifs 264
What Python Adds 264
What Python Removes 265
Why Indentation Syntax? 266
A Few Special Cases 269
A Quick Example: Interactive Loops 271
A Simple Interactive Loop 271
Doing Math on User Inputs 272
Handling Errors by Testing Inputs 273
Handling Errors with try Statements 274
Nesting Code Three Levels Deep 275
Chapter Summary 276
Test Your Knowledge: Quiz 276
Test Your Knowledge: Answers 277

11. Assignments, Expressions, and Prints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279


Assignment Statements 279
Assignment Statement Forms 280
Sequence Assignments 281
Extended Sequence Unpacking in Python 3.0 284
Multiple-Target Assignments 288
Augmented Assignments 289
Variable Name Rules 292
Expression Statements 295
Expression Statements and In-Place Changes 296
Print Operations 297
The Python 3.0 print Function 298
The Python 2.6 print Statement 300
Print Stream Redirection 302
Version-Neutral Printing 306
Chapter Summary 308
Test Your Knowledge: Quiz 308
Test Your Knowledge: Answers 308

12. if Tests and Syntax Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311


if Statements 311
General Format 311
Basic Examples 312
Multiway Branching 312
Python Syntax Rules 314
Block Delimiters: Indentation Rules 315
Statement Delimiters: Lines and Continuations 317
A Few Special Cases 318

Table of Contents | xiii


Truth Tests 320
The if/else Ternary Expression 321
Chapter Summary 324
Test Your Knowledge: Quiz 324
Test Your Knowledge: Answers 324

13. while and for Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327


while Loops 327
General Format 328
Examples 328
break, continue, pass, and the Loop else 329
General Loop Format 329
pass 330
continue 331
break 331
Loop else 332
for Loops 334
General Format 334
Examples 335
Loop Coding Techniques 341
Counter Loops: while and range 342
Nonexhaustive Traversals: range and Slices 343
Changing Lists: range 344
Parallel Traversals: zip and map 345
Generating Both Offsets and Items: enumerate 348
Chapter Summary 349
Test Your Knowledge: Quiz 349
Test Your Knowledge: Answers 350

14. Iterations and Comprehensions, Part 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351


Iterators: A First Look 351
The Iteration Protocol: File Iterators 352
Manual Iteration: iter and next 354
Other Built-in Type Iterators 356
List Comprehensions: A First Look 358
List Comprehension Basics 359
Using List Comprehensions on Files 359
Extended List Comprehension Syntax 361
Other Iteration Contexts 362
New Iterables in Python 3.0 366
The range Iterator 367
The map, zip, and filter Iterators 368
Multiple Versus Single Iterators 369

xiv | Table of Contents


Dictionary View Iterators 370
Other Iterator Topics 372
Chapter Summary 372
Test Your Knowledge: Quiz 372
Test Your Knowledge: Answers 373

15. The Documentation Interlude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375


Python Documentation Sources 375
# Comments 376
The dir Function 376
Docstrings: __doc__ 377
PyDoc: The help Function 380
PyDoc: HTML Reports 383
The Standard Manual Set 386
Web Resources 387
Published Books 387
Common Coding Gotchas 387
Chapter Summary 389
Test Your Knowledge: Quiz 389
Test Your Knowledge: Answers 390
Test Your Knowledge: Part III Exercises 390

Part IV. Functions

16. Function Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395


Why Use Functions? 396
Coding Functions 396
def Statements 398
def Executes at Runtime 399
A First Example: Definitions and Calls 400
Definition 400
Calls 400
Polymorphism in Python 401
A Second Example: Intersecting Sequences 402
Definition 402
Calls 403
Polymorphism Revisited 403
Local Variables 404
Chapter Summary 404
Test Your Knowledge: Quiz 405
Test Your Knowledge: Answers 405

Table of Contents | xv
17. Scopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Python Scope Basics 407
Scope Rules 408
Name Resolution: The LEGB Rule 410
Scope Example 411
The Built-in Scope 412
The global Statement 414
Minimize Global Variables 415
Minimize Cross-File Changes 416
Other Ways to Access Globals 418
Scopes and Nested Functions 419
Nested Scope Details 419
Nested Scope Examples 419
The nonlocal Statement 425
nonlocal Basics 425
nonlocal in Action 426
Why nonlocal? 429
Chapter Summary 432
Test Your Knowledge: Quiz 433
Test Your Knowledge: Answers 434

18. Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435


Argument-Passing Basics 435
Arguments and Shared References 436
Avoiding Mutable Argument Changes 438
Simulating Output Parameters 439
Special Argument-Matching Modes 440
The Basics 441
Matching Syntax 442
The Gritty Details 443
Keyword and Default Examples 444
Arbitrary Arguments Examples 446
Python 3.0 Keyword-Only Arguments 450
The min Wakeup Call! 453
Full Credit 454
Bonus Points 455
The Punch Line... 456
Generalized Set Functions 456
Emulating the Python 3.0 print Function 457
Using Keyword-Only Arguments 459
Chapter Summary 460
Test Your Knowledge: Quiz 461
Test Your Knowledge: Answers 462

xvi | Table of Contents


19. Advanced Function Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Function Design Concepts 463
Recursive Functions 465
Summation with Recursion 465
Coding Alternatives 466
Loop Statements Versus Recursion 467
Handling Arbitrary Structures 468
Function Objects: Attributes and Annotations 469
Indirect Function Calls 469
Function Introspection 470
Function Attributes 471
Function Annotations in 3.0 472
Anonymous Functions: lambda 474
lambda Basics 474
Why Use lambda? 475
How (Not) to Obfuscate Your Python Code 477
Nested lambdas and Scopes 478
Mapping Functions over Sequences: map 479
Functional Programming Tools: filter and reduce 481
Chapter Summary 483
Test Your Knowledge: Quiz 483
Test Your Knowledge: Answers 483

20. Iterations and Comprehensions, Part 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485


List Comprehensions Revisited: Functional Tools 485
List Comprehensions Versus map 486
Adding Tests and Nested Loops: filter 487
List Comprehensions and Matrixes 489
Comprehending List Comprehensions 490
Iterators Revisited: Generators 492
Generator Functions: yield Versus return 492
Generator Expressions: Iterators Meet Comprehensions 497
Generator Functions Versus Generator Expressions 498
Generators Are Single-Iterator Objects 499
Emulating zip and map with Iteration Tools 500
Value Generation in Built-in Types and Classes 506
3.0 Comprehension Syntax Summary 507
Comprehending Set and Dictionary Comprehensions 507
Extended Comprehension Syntax for Sets and Dictionaries 508
Timing Iteration Alternatives 509
Timing Module 509
Timing Script 510
Timing Results 511

Table of Contents | xvii


Timing Module Alternatives 513
Other Suggestions 517
Function Gotchas 518
Local Names Are Detected Statically 518
Defaults and Mutable Objects 520
Functions Without returns 522
Enclosing Scope Loop Variables 522
Chapter Summary 522
Test Your Knowledge: Quiz 523
Test Your Knowledge: Answers 523
Test Your Knowledge: Part IV Exercises 524

Part V. Modules

21. Modules: The Big Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529


Why Use Modules? 529
Python Program Architecture 530
How to Structure a Program 531
Imports and Attributes 531
Standard Library Modules 533
How Imports Work 533
1. Find It 534
2. Compile It (Maybe) 534
3. Run It 535
The Module Search Path 535
Configuring the Search Path 537
Search Path Variations 538
The sys.path List 538
Module File Selection 539
Advanced Module Selection Concepts 540
Chapter Summary 541
Test Your Knowledge: Quiz 541
Test Your Knowledge: Answers 542

22. Module Coding Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543


Module Creation 543
Module Usage 544
The import Statement 544
The from Statement 545
The from * Statement 545
Imports Happen Only Once 546
import and from Are Assignments 546

xviii | Table of Contents


Cross-File Name Changes 547
import and from Equivalence 548
Potential Pitfalls of the from Statement 548
Module Namespaces 550
Files Generate Namespaces 550
Attribute Name Qualification 552
Imports Versus Scopes 552
Namespace Nesting 553
Reloading Modules 554
reload Basics 555
reload Example 556
Chapter Summary 558
Test Your Knowledge: Quiz 558
Test Your Knowledge: Answers 558

23. Module Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561


Package Import Basics 561
Packages and Search Path Settings 562
Package __init__.py Files 563
Package Import Example 564
from Versus import with Packages 566
Why Use Package Imports? 566
A Tale of Three Systems 567
Package Relative Imports 569
Changes in Python 3.0 570
Relative Import Basics 570
Why Relative Imports? 572
The Scope of Relative Imports 574
Module Lookup Rules Summary 575
Relative Imports in Action 575
Chapter Summary 581
Test Your Knowledge: Quiz 582
Test Your Knowledge: Answers 582

24. Advanced Module Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583


Data Hiding in Modules 583
Minimizing from * Damage: _X and __all__ 584
Enabling Future Language Features 584
Mixed Usage Modes: __name__ and __main__ 585
Unit Tests with __name__ 586
Using Command-Line Arguments with __name__ 587
Changing the Module Search Path 590
The as Extension for import and from 591

Table of Contents | xix


Modules Are Objects: Metaprograms 591
Importing Modules by Name String 594
Transitive Module Reloads 595
Module Design Concepts 598
Module Gotchas 599
Statement Order Matters in Top-Level Code 599
from Copies Names but Doesn’t Link 600
from * Can Obscure the Meaning of Variables 601
reload May Not Impact from Imports 601
reload, from, and Interactive Testing 602
Recursive from Imports May Not Work 603
Chapter Summary 604
Test Your Knowledge: Quiz 604
Test Your Knowledge: Answers 605
Test Your Knowledge: Part V Exercises 605

Part VI. Classes and OOP

25. OOP: The Big Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611


Why Use Classes? 612
OOP from 30,000 Feet 613
Attribute Inheritance Search 613
Classes and Instances 615
Class Method Calls 616
Coding Class Trees 616
OOP Is About Code Reuse 619
Chapter Summary 622
Test Your Knowledge: Quiz 622
Test Your Knowledge: Answers 622

26. Class Coding Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625


Classes Generate Multiple Instance Objects 625
Class Objects Provide Default Behavior 626
Instance Objects Are Concrete Items 626
A First Example 627
Classes Are Customized by Inheritance 629
A Second Example 630
Classes Are Attributes in Modules 631
Classes Can Intercept Python Operators 633
A Third Example 634
Why Use Operator Overloading? 636
The World’s Simplest Python Class 636

xx | Table of Contents
Classes Versus Dictionaries 639
Chapter Summary 641
Test Your Knowledge: Quiz 641
Test Your Knowledge: Answers 641

27. A More Realistic Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643


Step 1: Making Instances 644
Coding Constructors 644
Testing As You Go 645
Using Code Two Ways 646
Step 2: Adding Behavior Methods 648
Coding Methods 649
Step 3: Operator Overloading 651
Providing Print Displays 652
Step 4: Customizing Behavior by Subclassing 653
Coding Subclasses 653
Augmenting Methods: The Bad Way 654
Augmenting Methods: The Good Way 654
Polymorphism in Action 656
Inherit, Customize, and Extend 657
OOP: The Big Idea 658
Step 5: Customizing Constructors, Too 658
OOP Is Simpler Than You May Think 660
Other Ways to Combine Classes 660
Step 6: Using Introspection Tools 663
Special Class Attributes 664
A Generic Display Tool 665
Instance Versus Class Attributes 666
Name Considerations in Tool Classes 667
Our Classes’ Final Form 668
Step 7 (Final): Storing Objects in a Database 669
Pickles and Shelves 670
Storing Objects on a Shelve Database 671
Exploring Shelves Interactively 672
Updating Objects on a Shelve 674
Future Directions 675
Chapter Summary 677
Test Your Knowledge: Quiz 677
Test Your Knowledge: Answers 678

28. Class Coding Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681


The class Statement 681
General Form 681

Table of Contents | xxi


Example 682
Methods 684
Method Example 685
Calling Superclass Constructors 686
Other Method Call Possibilities 686
Inheritance 687
Attribute Tree Construction 687
Specializing Inherited Methods 687
Class Interface Techniques 689
Abstract Superclasses 690
Python 2.6 and 3.0 Abstract Superclasses 692
Namespaces: The Whole Story 693
Simple Names: Global Unless Assigned 693
Attribute Names: Object Namespaces 693
The “Zen” of Python Namespaces: Assignments Classify Names 694
Namespace Dictionaries 696
Namespace Links 699
Documentation Strings Revisited 701
Classes Versus Modules 703
Chapter Summary 703
Test Your Knowledge: Quiz 703
Test Your Knowledge: Answers 704

29. Operator Overloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705


The Basics 705
Constructors and Expressions: __init__ and __sub__ 706
Common Operator Overloading Methods 706
Indexing and Slicing: __getitem__ and __setitem__ 708
Intercepting Slices 708
Index Iteration: __getitem__ 710
Iterator Objects: __iter__ and __next__ 711
User-Defined Iterators 712
Multiple Iterators on One Object 714
Membership: __contains__, __iter__, and __getitem__ 716
Attribute Reference: __getattr__ and __setattr__ 718
Other Attribute Management Tools 719
Emulating Privacy for Instance Attributes: Part 1 720
String Representation: __repr__ and __str__ 721
Right-Side and In-Place Addition: __radd__ and __iadd__ 723
In-Place Addition 725
Call Expressions: __call__ 725
Function Interfaces and Callback-Based Code 727
Comparisons: __lt__, __gt__, and Others 728

xxii | Table of Contents


The 2.6 __cmp__ Method (Removed in 3.0) 729
Boolean Tests: __bool__ and __len__ 730
Object Destruction: __del__ 732
Chapter Summary 733
Test Your Knowledge: Quiz 734
Test Your Knowledge: Answers 734

30. Designing with Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737


Python and OOP 737
Overloading by Call Signatures (or Not) 738
OOP and Inheritance: “Is-a” Relationships 739
OOP and Composition: “Has-a” Relationships 740
Stream Processors Revisited 742
OOP and Delegation: “Wrapper” Objects 745
Pseudoprivate Class Attributes 747
Name Mangling Overview 748
Why Use Pseudoprivate Attributes? 748
Methods Are Objects: Bound or Unbound 750
Unbound Methods are Functions in 3.0 752
Bound Methods and Other Callable Objects 754
Multiple Inheritance: “Mix-in” Classes 756
Coding Mix-in Display Classes 757
Classes Are Objects: Generic Object Factories 768
Why Factories? 769
Other Design-Related Topics 770
Chapter Summary 770
Test Your Knowledge: Quiz 770
Test Your Knowledge: Answers 771

31. Advanced Class Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773


Extending Built-in Types 773
Extending Types by Embedding 774
Extending Types by Subclassing 775
The “New-Style” Class Model 777
New-Style Class Changes 778
Type Model Changes 779
Diamond Inheritance Change 783
New-Style Class Extensions 788
Instance Slots 788
Class Properties 792
__getattribute__ and Descriptors 794
Metaclasses 794
Static and Class Methods 795

Table of Contents | xxiii


Another Random Document on
Scribd Without Any Related Topics
Period. It was followed by depression and extensive sedimentation,
proceeding more or less continuously though with local interruptions
through Lower Palæozoic times, so that so far as Britain is
concerned we may speak of Lower Palæozoic times as constituting
the First Marine Period. Extensive upheaval gave rise to continental
tracts and mountain chains, and deposits of abnormal character (as
compared with ordinary marine deposits) at the end of Lower
Palæozoic times;—the Devonian period was one of elevation and
denudation, and we may therefore refer to it as the Second
Continental Period. This was followed by depression and
sedimentation in Carboniferous times, and these Carboniferous times
constitute the Second Marine Period. Elevation gave rise to
continental tracts and mountain chains at the end of Carboniferous
times, and here again we find proofs of extensive denudation and
the formation of abnormal deposits:—the Permo-Triassic period is
the Third Continental Period. Depression set in during early Jurassic
times and continued throughout the Mesozoic and the early part of
Tertiary times, which form the Third Marine Period. Disturbances
culminating in Miocene times once more produced terrestrial
conditions. In this, the Fourth Continental Period, we are still living.
From what has been previously written it will be seen that each
of the marine periods should be marked by an early and late
shallow-water phase, separated by an intervening marine phase, and
the importance of the phases will depend upon the length of time
during which they existed, and will differ markedly in different cases,
whilst the distinctness of the middle phase from the upper and
lower, will depend upon the magnitude of the maximum
submergence.
During the first marine period submergence was comparatively
rapid, and the shallow-water phase only lasted through very early
Cambrian times in most regions, whilst the deep-water phase,
complicated by many minor upheavals, extended through the main
part of Cambrian, Ordovician and Silurian times, and was replaced
by the later shallow-water phase at the end of Silurian times.
The second marine period again was ushered in by rapid
submergence, so that the shallow-water phase was brief, and the
main mass of the Lower Carboniferous strata was deposited in deep
water; but, unlike the first marine period, the second was
characterised by the occurrence of a long interval of time marking
the later shallow-water phase, during which the whole of the Upper
Carboniferous strata were deposited. The Carboniferous Marine
Period is the simplest of the three with which we have to deal, as
the local oscillations occurring on a fairly large scale for such
movements were less frequent than was the case during the first
and third marine periods.
The third marine period had a long shallow-water phase at the
commencement, with many minor oscillations, causing great
variation in the character of the deposits and frequent minor
unconformities. This shallow-water phase existed throughout
Jurassic and Lower Cretaceous times. The deep-water phase existed
during the deposition of the Upper Cretaceous deposits, and was
succeeded by the second shallow-water phase, when the early
Tertiary strata were accumulated.
The difference between the elevations which accompanied the
Continental Periods and those which have been alluded to as minor
elevations is no doubt one of degree, but in considering the British
strata only no confusion is likely to arise on this account, as the
difference was here very great.
The events which occurred during the continental periods are of
extreme importance to the geologist. Every great upheaval was
accompanied by crumpling and stiffening of portions of the earth's
crust, and a definite trend was given to the strata as the result of
these movements. It is to the earth-movements of the four great
continental periods that the present structure of the British Isles is
largely due, and in any attempt to restore the physical history of our
islands considerable attention must be paid to the changes which
were produced in the stratified rocks during these periods of earth-
movement.
CHAPTER XIV.

THE CAMBRIAN SYSTEM.


Classification. The rocks of the Cambrian system when found
reposing on Precambrian rocks in Britain are always separated from
the latter by an unconformity. The typical development of the rocks
of the system, as the name implies, is in the hilly region of
Caernarvonshire and Merionethshire in North Wales, and they are
also well represented in South Wales, the border counties between
England and Wales, and the North-West Highlands of Scotland. Two
distinct classifications of the Cambrian rocks of Britain are in use, the
original one founded on variations of lithological character, whilst the
second depends upon faunistic differences, but the original
lithological classification has been to some extent modified to make
it locally correspond with the classification based upon
palæontological grounds. The following table will shew the
differences:—

Palæontological
Lithological Classification.
Classification.
Beds with Intermediate
Tremadoc Slate Series[64] Fauna
Lingula Flags Series Beds with Olenus Fauna
Menevian beds (formerly included in Beds with Paradoxides
Lingula Flags) Fauna

Solva beds Formerly grouped


together as Harlech Beds with Olenellus
Caerfai beds or Llanberis beds Fauna
[64] In accordance with the custom usually observed in Britain, the Tremadoc
slates are placed in the Cambrian system; most continental geologists place them
in the succeeding Ordovician system. The matter is not an important one, as the
fauna is an intermediate one between that of the Lingula Flags and that of the
Arenig series of the Ordovician system, and the beds are true beds of passage. As
the lithological classification is essentially British, it will be as well to retain the
Tremadoc Slates in the Cambrian system.

The original lithological classification was essentially the result of


Prof. Sedgwick's work in North Wales, while the classification
according to faunas is the outcome of the researches of Dr Hicks in
South Wales.
Description of the Strata. The Cambrian rocks of North Wales
occur in two complex anticlines, separated by an intermediate
syncline of Ordovician strata occupying the Snowdonian hills. The
southerly or Harlech anticline forms a part of Merionethshire to the
east of Harlech, whilst the northern one is developed around Bangor
and Llanberis. The South Welsh Cambrian rocks are chiefly found on
either side of the Pembrokeshire axis of Precambrian rocks which
runs through St David's. As the corresponding rocks of the two
regions were deposited in bathymetrical zones of much the same
depth, it will be convenient to give a general account of the rocks of
the two regions at the same time, leaving the student to acquire
information of the detailed variations in the larger text-books and in
special memoirs[65].
[65] A general account of the Cambrian, Ordovician and Silurian rocks will be
found in the Sedgwick Essay for 1883, A Classification of the Cambrian and
Silurian Rocks, though the use of a cumbrous nomenclature therein will tend to
confuse the reader. For a detailed account of the Cambrian rocks of North Wales
the reader is referred to the Geological Survey Memoir, The Geology of North
Wales, by Sir A. Ramsay (2nd edition), he may also consult Belt, T., "On the
Lingula Flags or Festiniog Group of the Dolgelly district," Geol. Mag., Dec I. vol. IV.
pp. 493, 536, vol. V. p. 5. The geology of the Cambrian rocks is described in a
series of Memoirs in the Quarterly Journal of the Geological Society by Dr H. Hicks;
the following should be consulted: Harkness, R. and Hicks, H., "On the Ancient
Rocks of the St David's Promontory, South Wales, and their Fossil Contents," vol.
XXVII. p. 384; Hicks, H., "On some Undescribed Fossils from the Menevian Group,"
vol. XXVIII. p. 173; and "On the Tremadoc Rocks in the neighbourhood of St
David's, South Wales, and their Fossil Contents," vol. XXIX. p. 39. See also Hicks,
"The Classification of the Eozoic and Lower Palæozoic Rocks of the British Isles,"
Popular Science Review, New Series, vol. V., and Hicks, "Life-zones in the Lower
Palæozoic Rocks," Geol. Mag. Dec IV. vol. I. pp. 368, 399 and 441.

The strata of the Caerfai and Solva groups show the prevalence
of the shallow-water phase almost uninterruptedly through the
whole of the time occupied by their accumulation in the Welsh areas.
They consist chiefly of basal conglomerates, succeeded by
alternations of grits and shales, though the latter are often
converted into slates, owing to the subsequent production of
cleavage. The basal conglomerates of the Caerfai beds are
frequently marked by the existence of enormous pebbles, composed
of fragments of the rocks of the underlying Precambrian groups, and
the possibility of the occurrence of glacial action during their
accumulation as advocated by Dr Hicks must be taken into account.
Above these beds are various coloured grits, with alternations of
muddy sediments often coloured red[66]. The Solva group consists of
massive grits, of various colours, also with alternations of mud,
which have prevalent purple and green hues. The great thickness of
the strata of the Caerfai and Solva Series, which sometimes exceeds
10,000 feet, must also be noted.
[66] In giving this description the red (Glyn) slates of North Wales are treated
as belonging to the Caerfai series, though this correlation depends on lithological
characters only at present.

The Menevian beds consist essentially of very fine, well laminated


black and grey muds, which are of a texture favourable for the
production of a somewhat regular jointing, causing the rock to break
into small rectangular blocks. They are thin, not exceeding 600 feet
in thickness, and indicate the incoming of the general deep-water
phase of the Lower Palæozoic epoch. The Lingula Flags mark a local
return to shallower water conditions, especially in the central
portion. The total thickness is over 3,000 feet, of which the lower
stage (locally the Maentwrog series) is over 500 feet, and consists of
blackish muds, the middle (Festiniog stage[67]) is about 2,000 feet
thick, and is composed chiefly of shallower water gritty flags, whilst
the upper (Dolgelly) stage is of about the same thickness as the
lower stage and has similar lithological characters.
[67] The term Festiniog has been used for the whole Lingula Flag series as well
as for the middle stage. It will be well to use it with reference to the stage only.

The Tremadoc Slates are about 1,000 feet thick. They are divided
into a lower and upper stage, of about equal thickness, and are
essentially composed of iron-stained slates, with a considerable
admixture of calcareous matter in some parts of South Wales, when
they furnish the nearest approach to a limestone which has been
found amongst the Welsh Cambrian strata. They were probably
formed in a fairly deep sea.
Much pyroclastic rock and some lava flows are intercalated
amongst the Welsh Cambrian sediments. Tuffs are formed in the
lower beds of St David's, and lavas and ashes have been found
amongst the Lingula Flags and Tremadoc Slates of North Wales,
while the Lingula Flags of South Wales have furnished several bands
of ash to the north of Haverfordwest. Much of the material of the
grits and muds may be derived from volcanic rocks, though how far
this is so cannot be stated in the absence of information obtained by
detailed petrological examination of the rocks.
The various isolated outcrops of Cambrian strata amongst the
counties of the Welsh borders and adjoining Midland counties
indicate a great thinning of the Cambrian rocks in this direction.
The probable equivalents of the Caerfai rocks occur at Nuneaton,
Comley, and on the flanks of the Wrekin and Malvern hills. The thin
basal conglomerates are succeeded by quartzites, and sometimes
red calcareous sandstones (Comley sandstone). These rocks are
succeeded by thin arenaceous and calcareous beds which represent
either the Solva or Menevian beds of Wales. The Lingula Flags are
represented by the Malvern Shales of the Malvern area and the
Stockingford Shales of Nuneaton, whilst the Tremadoc Slates have as
their equivalents the Shineton Shales. The exact thicknesses of these
deposits do not seem to have been recorded, but Prof. Lapworth
observes that in central Shropshire "the Comley and Shineton groups
which ... have a collective thickness of perhaps less than 3,000 feet,
we have apparently a condensed epitome of the entire Cambrian
system as at present generally defined."
The Cambrian rocks of the North-west Highlands consist of a thin
conglomerate succeeded by grits and flags with shaley beds, and
above these a mass of limestone, which may represent some of the
Ordovician deposits as well as those of Cambrian age. Pending a
complete description of the faunas of these rocks, it is sufficient to
state that the only fauna which has hitherto been described in detail
indicates the existence of Lowest Cambrian rocks. Further remarks
will be made on this head when describing the character of the
Cambrian faunas. The Cambrian rocks of the North-west Highlands
are also very thin as compared with those of Wales, so that the
Highland and Welsh borderland regions appear to have existed as a
deeper sea area than that which is indicated by the Cambrian rocks
of Wales, an inference which is to some extent borne out by study of
the Cambrian rocks of extra-British areas, to which we may now
turn.
The principal European developments of Cambrian rock are found
in Scandinavia, Russia, Bohemia and Spain, and of these the
Scandinavian one is by far the most fully developed, as there is a
complete sequence in the rocks of that peninsula. They occur both in
Norway and Sweden, but the Swedish exposures are the most
interesting in most respects, especially those of Westrogothia and
Scania. The rocks are of no great thickness, and consist essentially
of black carbonaceous shales, with inconstant bands of impure black
limestone composed almost entirely of the remains of trilobites or
more rarely of brachiopods. These Alum Shales, as they are termed,
rest unconformably upon Precambrian rocks, and have arenaceous
and conglomeratic deposits at the base. In Russia the rocks are still
further attenuated, and have not yielded the relics of so many
faunas as have been found in the Scandinavian Cambrian rocks.
The Bohemian development is incomplete, owing apparently to
an unconformity at the base of the overlying Ordovician rocks, while
the Spanish deposits which seem fairly thick and composed largely
of mechanical sediments have not been worked out in very great
detail.
The American development of Cambrian rocks resembles the
European one in many striking particulars, and as in the case of
Europe, there are lateral variations in the lithological characters of
the rocks, though in the opposite direction, the shallow-water
deposits occurring on the east coast, and the deep-water deposits
further west.
The general distribution of the different types of Cambrian strata
in Europe and North America has been accounted for on the
supposition that in Cambrian times a tract of land lay over much of
the present site of the North Atlantic Ocean, and that the detritus of
that land formed the shallow-water accumulations of Wales and the
east of Canada, whilst further away from it were deposited the open-
sea accumulations of Scandinavia and Russia on one side and of the
more westerly regions of North America on the other, as indicated in
Fig. 16.

Fig. 16.

P. Precambrian Rocks.
A. Land.
XX´. Sea level.
BB´. Shore deposits.
CC´. Deep-water deposits.
DD´. Abyssal deposits.
The Cambrian Faunas. The Cambrian Period has been termed the
age of trilobites, for they are the dominant forms of the time, but
they are associated with many other forms of invertebrata; indeed
all the great groups of this division are represented in the earliest
Cambrian fauna. Dr C. D. Walcott records representatives of
Spongiae, Hydrozoa, Echinodermata, Annelida, Brachiopoda,
Lamellibranchiata, Gastropoda, Pteropoda, Crustacea and Trilobita as
occurring in the Olenellus beds of North America and other groups
are represented in the rocks of this age in the Old World. The
Cambrian trilobites as a whole are of more generalised types than
those of the later systems which furnish their remains, as indicated
especially by the looseness of the body, and the large number of
body rings in many of the genera, while the tail or pygidium was
small and formed of only a few coalesced segments, as pointed out
by Barrande. In the later trilobites the test is more compact, there
are on the whole fewer body rings, as more of these have become
fused into a tail which is therefore larger than that of the average
tail of the Cambrian trilobite.
Taking the faunas in order, the oldest or Olenellus fauna has
furnished a great variety of forms in the North-west Highlands of
Scotland, Shropshire, Scandinavia, Esthonia, Sardinia, Canada, and
Newfoundland, whilst representative species of the fauna have been
recorded also from Worcestershire, Warwickshire, Pembrokeshire,
India, China, and Australia.
The dominant form is the trilobite of the genus or group
Olenellus, which contains a great variety of species referable to three
or four divisions which have been ranked as separate genera by
some writers. Associated with Olenellus are trilobites belonging to
other genera, which are found in higher deposits, though there
represented by different species.
Brachiopods are fairly abundant, especially those provided with a
horny shell; of these, the genus Kutorgina is widely distributed.
The zoological relationships of several of the fossils of this
horizon are as yet doubtful. The Archæocyathinæ show affinities
with certain corals; a number of tests, included in the genus
Hyolithes and its allies are doubtfully referred to the Pteropods, and
the position of the genus Volborthella is uncertain. Special attention
is directed to these doubtful relationships, as it is possible that a
number of 'generalised forms' of organisms occur in these strata[68].
[68] For an account of the Olenellus fauna see Walcott, C. D., "The Fauna of
the Lower Cambrian or Olenellus Zone," Tenth Annual Report of the Director of the
United States Geological Survey, Washington, 1890. It is possible that some of the
fossils mentioned in that report belong to strata above that containing Olenellus.

It should be noticed here that faunas have been discovered


which are possibly of earlier date than the Olenellus fauna, as they
do not correspond with it, or with those of newer strata. One, the
Neobolus fauna of the Salt Range of India, occurs in beds below
those with Olenellus, though it is not yet clear that Olenellus will not
be eventually discovered associated with it, whilst the other, the
Protolenus fauna of Canada, is of unknown age[69].
[69] For an account of the Neobolus beds see Noetling, F., "On the Cambrian
Formation of the Eastern Salt Range," Records Geol. Survey, India, vol. XXVII. p.
71, and for the Protolenus fauna consult a paper by Matthew, G. F., "The
Protolenus Fauna," Trans. New York Acad. of Science, 1895, vol. XIV. p. 101.

The Olenellus beds are succeeded by beds containing the


Paradoxides fauna, which have been found in North and South
Wales, Shropshire, Scandinavia, Bohemia, Spain, and North and
South America. Olenellus and its allies became extinct (or else so
scarce that no relics of them have been discovered in the
Paradoxides beds) before the commencement of the deposition of
the strata containing the Paradoxides fauna, and few genera pass
from the beds with the one fauna to that containing the other. The
Paradoxides fauna existed for a considerable period, and the beds
have been divided into a series of zones characterised by different
species of Paradoxides, thus
Dr Hicks records the following zones in Pembrokeshire[70]:—

Zone of Paradoxides Davidis


Menevian.
" " Hicksii
" " Aurora
" " Solvensis Solva.
" " Harknessi
[70] The order here as elsewhere is ascending, i.e. the newest deposit is
placed at the top.

Dr Tullberg divides the Paradoxides beds of Scania into thirteen


zones, though only a few of these are characterised by definite
species of Paradoxides. The Olenellus beds have not yet been
divided into zones, though this will probably be the outcome of
further study[71].
[71] The Paradoxides fauna is described in the following works: Britain, Hicks,
H. and Salter J. W., Quart. Journ. Geol. Soc., vol. XXIV. p. 510, XXV. p. 51, XXVII.
p. 173, and Hicks, H. and Harkness, R., ibid. vol. XXVII. p. 384; Scandinavia,
Angelin, N. P., Palæontologia Scandinavica; Brögger, W. C., Nyt Magazin for
Naturvidenskaberne, vol. XXIV., Linnarsson, G., Sveriges Geologiska Undersökning,
Ser. C. No. 35; Bohemia, Barrande, J., Système Silurien du centre de la Bohême;
Spain, Prado, C. de, "Sur l'existence de la faune Primordiale dans la chaîne
Cantabrique suivie de la description des Fossiles par MM. de Verneuil et Barrande,"
Bull. Soc. Geol. France, 2 Series, vol. XVII. p. 516; America, Walcott, C. D., Bull. U.
S. Geol. Survey: "The Cambrian Faunas of North America," and Matthew, G. F.,
Trans. Roy. Soc. Canada, 1882 and succeeding years.

The strata with Paradoxides are succeeded by those with the


Olenus fauna, characterised by the genus Olenus and a large
number of allied genera or sub-genera as some prefer to term them.
The genus Olenus (sensu stricto) is very abundant in the lower part
of the series, whilst the allied forms are more abundant in the upper
beds. The genus Paradoxides and its associates disappeared before
the deposition of these strata containing Olenus and its allies, and
indeed the complete change in the character of the faunas in Europe
is very remarkable. The Olenus fauna has been found in North
Wales, Pembrokeshire, Warwickshire, Worcestershire, and abroad in
Scandinavia and Canada. It is interesting to note among the fossils
of the Olenus beds the occurrence of a graptolite which is associated
with Olenus in Scandinavia; this is the earliest recorded appearance
of a group which is destined to play so important a role amongst the
fossils of the succeeding system[72]. The following zones have been
detected by Dr S. A. Tullberg amongst the Olenus beds of Scania:—
Zone of Acerocare ecorne.
" Dictyograptus flabelliformis.
" Cyclognathus micropygus.
" Peltura scarabæoides.
" Eurycare camuricorne.
" Parabolina spinulosa.
" Ceratopyge sp.
" Olenus (proper).
" Leperditia.
" Agnostus pisiformis.
[72] For descriptions of the Olenus fauna consult the following:—Wales, Belt,
T., Geol. Mag. Dec. I. vol. V. p. 5, and Salter, J. W., Decades Geol. Survey, Decade
II. Pl. IX. and Decade XI. Pl. VIII.; Scandinavia, Angelin, N. P., Palæontologia
Scandinavica, and Brögger, W. C., Die Silurischen Etagen 2 und 3 im
Kristianiagebiet und auf Eker; Canada, Matthew, G. F., "Illustrations of the Fauna
of the St John Group, No. VI.," Trans. Roy. Soc. Canada, 1891.

The beds with Dictyograptus flabelliformis form a wonderfully


constant horizon at or near the top of the Olenus beds. They are
found in North Wales, the Border Counties between Wales and
England, France, Scandinavia, Russia and Canada.
The passage fauna of the beds which are the equivalents of the
Tremadoc Slates may be spoken of as the Ceratopyge fauna, for
Ceratopyge forficula, a remarkable species of trilobite, characterises
it in Scandinavia, and will probably be found elsewhere. Ceratopyge
beds have been found in North and South Wales, Shropshire,
Scandinavia, Bavaria and North America, and in each case the fauna
is intermediate in character between that of the Cambrian and that
of the Ordovician system, containing the loosely-formed trilobites of
the former with the more compact ones of the latter. The genus
Bryograptus, a many-branched graptolite, also appears to
characterise this fauna[73].
[73] For accounts of the Tremadoc Slates Fauna in England and Wales see
Ramsay, A. C., Geology of North Wales, Appendix; Hicks, H., Quart. Journ. Geol.
Soc., vol. XXIX. p. 39; Callaway, C., ibid. vol. XXXIII. p. 652, whilst many of the
foreign fossils are noticed in Brögger's Die Silurischen Etagen 2 und 3 and
Barrande's Faune silurienne des Environs de Hof en Bavière.

The faunas of the Cambrian rocks have not been studied in


sufficient detail, with reference to the physical surroundings of the
organisms, to throw much light upon the conditions under which the
strata were deposited, though the evidence obtained from an
examination of the lithological characters of the deposits is generally
corroborated by study of the organic contents.

CHAPTER XV.

THE ORDOVICIAN SYSTEM.


Classification. The Ordovician strata were originally divided into
series by Sedgwick as follows:—
Upper Bala,
Middle Bala,
Lower Bala,
Arenig.
The Arenig series was at one time included by some writers with
the Lower Bala under the name Llandeilo, but the word Llandeilo is
now used in the sense of Sedgwick's Lower Bala. The Middle Bala is
often spoken of as Caradoc, but the terms Bala and Caradoc are
sometimes used interchangeably. As much confusion attaches to the
use of the name Bala without explanation, the alternative titles have
been largely adopted, and as the series are well defined there is no
objection to their use, save that some expression is wanted
equivalent to Upper Bala. The local term Ashgill shales was originally
applied by Mr W. Talbot Aveline to beds of this age in Lakeland, and
I have elsewhere suggested the use of this name for the whole
series in that region; its use may well be extended to the series
which is developed in many parts of Britain and the continent. The
terms which will be used here, therefore, for the different series of
the Ordovician system are the following:—
Ashgill Series (= Upper Bala)
Caradoc " (= Middle " )
Llandeilo " (= Lower " )
Arenig. "

Adopting a palæontological classification, we may speak of the


Arenig and Llandeilo beds as those containing the Asaphus fauna,
whilst the Caradoc and Ashgill beds possess the Trinucleus fauna;
this is the terminology employed by Angelin for the equivalent strata
of Sweden. It must be noted that here the names applied are not
those of absolutely characteristic genera, as was the case with those
adopted for naming the Cambrian faunas, for both Asaphus and
Trinucleus range through the beds of the system; but whereas
Asaphus is most abundant in the beds of the two lower series,
Trinucleus occurs most frequently in those of the two upper series.
Description of the strata. The Ordovician rocks are found over
large tracts in North and South Wales, in the counties on the Welsh
border, in Lakeland and the outlying districts in the Southern
Uplands of Scotland, and in detached areas in Ireland. There are
three main types of deposit:—(i) the volcanic type, in which the
ordinary sediments are associated with a large amount of
contemporaneous volcanic matter, (ii) the black shale type, with a
fauna consisting largely of graptolites, and (iii) the ordinary
sedimentary type, in which we find alternations of grits, shales, and
more or less impure limestones. We also find developments which
are intermediate between any two or even all three of these types.
The first type is characteristically developed in Caernarvonshire and
Merionethshire, the second in the Dumfriesshire Uplands, and the
third in the Girvan district of Ayrshire. The variation in the thickness
of these three types of deposit is shown in the accompanying
sections of the Caernarvon, Merioneth, Moffat and Girvan regions
(see Fig. 17).

Fig. 17.

Showing the variations in


the characters of the
Ordovician deposits of
the three principal types.
Scale 1 in. = 1000 feet.

A = Arenig. L =
Llandeilo. C = Caradoc.

The thickness of the


Arenig rocks of the
Scotch areas is unknown.
The North Welsh area gives two different developments of the
Ordovician strata, one of which is much less volcanic than the other.
In the Merioneth-Caernarvon area, two great masses of volcanic
rock form the Aran and Arenig hills of Merioneth and the
Snowdonian group of Caernarvon. The former are of Arenig, the
latter of Caradoc age. The Merionethshire volcanic rocks consist of a
great thickness of lavas and ashes of intermediate composition
(anderites), associated with sandy and muddy sediments of no great
vertical depth. The Llandeilo beds of this area are chiefly of the
nature of black shales, while the Caradoc series is represented by
volcanic lavas and ashes of acid composition (felsites) with a few
thin interbedded sediments. A calcareous ash forming the summit of
Snowdon is of importance as being on the same horizon as a
limestone (the Bala limestone) found in the other North Welsh area.
The Ashgill series is not represented in Snowdonia.
In the other North Welsh tract, around Bala Lake, the volcanic
matter is much less conspicuous. The Arenig rocks are not seen
nearer than the Arenig mountains which form the western boundary
of this second tract. The Llandeilo beds consist of shaley deposits
with a well-marked limestone, the Llandeilo limestone, in the centre,
whilst the Caradoc beds consist chiefly of muddy sediments with
some thin ashes and a limestone, the Bala limestone, at the top. The
Ashgill series contains a basal limestone, the Rhiwlas limestone,
succeeded by shales, and another thin limestone called the Hirnant
limestone at the summit.
In South Wales the Arenig beds[74] are chiefly composed of
slates, and are divisible into an upper and lower group. The total
thickness is about 2000 feet. The Llandeilo beds contain three
series:—
Upper Llandeilo Slates 1000
Llandeilo Limestone 200
Lower Llandeilo Slates 800.
[74] A remarkable fauna, fairly well represented in Britain and exceedingly well
developed on the continent, exists in the Uppermost Arenig and Lower Llandeilo
beds, and it is well separated from the dominant Arenig fauna below and Llandeilo
fauna above. To the beds which contain it Dr Hicks has given the name Llanvirn
series.

The Caradoc beds consist of black graptolitic shales of no great


thickness, succeeded by an impure limestone on the horizon of the
Bala limestone, while the Ashgill series like that of North Wales is
separated into upper and lower limestone stages with an intervening
stage composed of shales.
The deposits of the Welsh borderland are well developed in
Shropshire, where there is practically a repetition of the Caernarvon-
Merioneth development, with variations in detail. The Arenig and
Caradoc volcanic rocks are not so thick as those of the Welsh
district, but are nevertheless of considerable importance[75].
[75] For information concerning these beds see Lapworth, C. and Watts, W. W.,
"The Geology of South Shropshire," Proc. Geol. Assoc., vol. XIII. p. 297.

In the hilly region of Cumberland, Westmorland, and the


adjoining parts of Yorkshire the succession differs from that of any of
the Welsh regions, for the great period of volcanicity was during the
formation of the Llandeilo rocks, and there were merely sporadic
outbursts in Arenig and Caradoc times. The Arenig rocks consist of
black shales with interstratified beds of coarser sediment, and some
thin lavas and ashes of intermediate type. The Llandeilo series is
represented by a very great thickness of volcanic rocks, varying in
composition from basic to acid lavas, with associated pyroclastic
rocks. The rocks of the Caradoc period largely consist of impure
limestone with associated argillaceous rocks, and contemporaneous
volcanic rocks of acid character. A marked unconformity is found
locally in the centre of these. The Ashgill series consists of a basal
limestone with shales above, and there is evidence that volcanic
activity had not become extinct during the deposition of the rocks of
this series.
Passing on to Scotland, the graptolitic type is admirably shown in
the southern Uplands of the neighbourhood of Moffat,
Dumfriesshire. The base of the Ordovician system has not been
found, but the lowest series seems to be represented by shales with
a graptolite possibly of Arenig age. Above this are volcanic beds
succeeded by a group of black shales known as the Moffat shales.
They are only about six hundred feet in thickness, and yet represent
much of the Ordovician and part of the Silurian strata as developed
elsewhere. The beds belonging to the Ordovician system are divided
into two series, the Glenkiln shales below and the Hartfell shales
above. The former consist of intensely black muds with few fossils
save graptolites, and a deposit of chert at the base which is
composed of radiolaria. The graptolites of the black shales are Upper
Llandeilo forms, but the thin deposit of radiolarian chert may
represent the rest of the Llandeilo period and part of the Arenig
period also. The Hartfell shales are also usually black graptolite
shales with lighter deposits nearly barren of organic remains; they
represent the Caradoc and Ashgill series and pass conformably into
the deposits of Silurian age[76]. The ordinary sedimentary type of
Ordovician rocks is found in Ayrshire, though a few thin graptolitic
seams are intercalated with the conglomerates and shelly sands,
clays and limestones of the region, which is therefore peculiarly
valuable as affording a means of comparison of the shelly type with
the graptolitic type of Ordovician deposits. The Arenig series consists
of black shales with graptolites, and these rocks are succeeded by a
volcanic group which is probably of Llandeilo age. Above these
volcanic beds, as in Dumfriesshire, we find three great divisions, two
of which are of Ordovician, the third of Silurian age. The Ordovician
divisions are respectively termed the Barr series, which is the
equivalent of the Glenkiln shales, and the Ardmillan series above,
equivalent to the Hartfell shales[77].
[76] The Moffat beds are described in a paper by Prof. Lapworth entitled "The
Moffat Series" in the Quarterly Journal of the Geological Society, vol. XXXIV. p.
239. This paper, which is a masterpiece of detailed work, has furnished a clue to
many problems. Few students will be able to follow the numerous details, and for
general information concerning the beds they are recommended to read another
paper by the same author "On the Ballantrae Rocks of South Scotland," Geol. Mag.
Dec. III. vol. VI. p. 20. An account of the radiolarian cherts by Dr G. J. Hinde will
be found in the Annals and Magazine of Natural History for July, 1890, p. 40.
[77] See Lapworth, C., "The Girvan Succession," Quart. Journ. Geol. Soc., vol.
XXXVIII. p. 537, and also the paper on the Ballantrae Rocks referred to in the
preceding footnote. The latter paper should be carefully read by all students of the
stratigraphy of the Lower Palæozoic Rocks.

It is interesting to find that in the north of Ireland the rocks


generally coincide in characters with those which are found along
the same line of strike in Great Britain; thus, the Girvan type appears
in Londonderry, Tyrone and Fermanagh, the Moffat type in County
Down, and the Lake District type in the counties of Dublin and
Kildare.
On the continent the volcanic material which plays so important a
part in the constitution of the Ordovician accumulations of Britain is
practically absent, and the strata are largely composed of
accumulations of shale and limestone with occasional coarser
deposits. In Scandinavia, the Arenig beds consist of limestones with
a few shales, the Llandeilo deposits are largely calcareous, those of
Caradoc age are partly calcareous and towards the top usually
argillaceous, while the equivalents of the British Ashgill series are
calcareous at the base and argillaceous at the summit. In Russia the
calcareous matter preponderates over the argillaceous material.
Ordovician strata are also found in Belgium, France, Bohemia,
and other places, and are largely composed of mechanical sediments
of varying degrees of fineness mixed occasionally with some
calcareous matter.
The variation in the characters of the Ordovician strata of Britain
points to accumulation in a fairly deep sea, usually at some distance
from the land, but dotted over with volcanoes which often rose
above the water, causing the addition of much volcanic material to
the ordinary sediments, and the existence of minor unconformities at
different horizons along their flanks. As these unconformities are not
always associated with volcanic material it is obvious that uplifts
must have occurred occasionally during the deposition of the rocks;
one important uplift is indicated by the occurrence of an
unconformity in the Arenig rocks of Wales, while another is seen
amongst the Caradoc rocks of the Welsh borders. On the whole,
however, the period was one of slow subsidence, the deposition of
material generally keeping pace with this subsidence, and
accordingly there is a great uniformity of characters amongst the
strata over wide areas. The probable continuation through the
Ordovician period of the tract of land over the present site of the N.
Atlantic ocean which as we have reason to suppose existed during
Cambrian times, is indicated by similar changes of lithological
character amongst the strata when traced from Britain eastward to
Russia in both Cambrian and Ordovician times, and the continuance
of these conditions over the American area is also indicated by study
of the variations amongst the American Ordovician deposits.
The Ordovician Faunas. The Ordovician period has justly been
termed the Period of Graptolites, which are the dominant forms of
the time, and continue in abundance throughout the period. The
abundance of graptolites in black shales associated with few other
organisms has often been noted. It appears to be due to a large
extent to the slow accumulation of the graptolitic deposits, allowing
an abundance of these creatures to be showered upon the ocean
floor, after death, for the evidence derived from detailed examination
of their structure points to their existence as floating organisms. The
tests of other creatures largely calcareous may well have been
dissolved before reaching the sea-floor. In support of the view that
these black shales are abysmal deposits may be noted the singular
persistence of their lithological characters over wide areas, their
replacement by much greater thicknesses of normal sediments along
the ancient coast-lines, the frequent occurrence together of blind
trilobites with those having abnormally large eyes when these
creatures are associated with graptolites in the black shales, and
lastly the interstratification of the black shales with radiolarian cherts
similar to the modern abysmal radiolarian oozes. If this be so, we
ought to find graptolites in marine deposits of all kinds, and indeed
they are found there, though largely masked by the mass of
sediment and the hosts of other included fossils, so that their
discovery is rendered much more difficult than when they occur in
the black shales,—a state of things which is familiar in the case of
other pelagic organisms as Globigerinæ, radiolaria, and pteropods,
whose tests abound in the abysmal deposits and are comparatively
rare in those of terrigenous origin[78].
[78] The importance of the graptolites as indices of the geological age will be
seen by perusal of Prof. Lapworth's paper "On the Geological Distribution of the
Rhabdophora," Ann. and Mag. Nat. Hist., Ser. 5, vol. III. (1897).

The characters of the Ordovician trilobites have already been


noticed. These organisms are abundant, and occur in sediments of
all kinds. Of other groups, the significance of the radiolaria has been
referred to above. Corals occasionally form reef-like masses of
limestone as in the limestones of the Caradoc epoch; the
echinoderms are well represented, cystids being locally abundant; of
the crustacea, many remains of tests of phyllocarida have been
recorded; the brachiopods are very abundant, and of the mollusca,
lamellibranchs, gastropods and cephalopods all occur with frequency
though none of these groups is very prevalent. Certain forms have
been referred to pteropods though with doubt, and other shells
seem to be referable to the heteropods. The existence of vertebrates
during Ordovician times is not, in the opinion of many geologists,
proved, though remains of fishes have been recorded from the
Ordovician strata of North America; but it is desirable that more
evidence of this occurrence should be given[79].
[79] Walcott, C. D., "Preliminary Notes on the Discovery of a Vertebrate Fauna
in Silurian (Ordovician) Strata," Bulletin Geol. Soc. America, vol. III. p. 153.

The distribution of the Ordovician faunas like that of the


sediments points to the prevalence of open ocean conditions over
wide areas during the period, with occasional approaches to land,
which was often of a volcanic nature. Around this land clustered the
ordinary invertebrates, building up coral-reefs and shell-banks, whilst
away in the open oceans the graptolites floated, almost alone, and
sank to the ocean floor after death.

CHAPTER XVI.

THE SILURIAN SYSTEM AND THE


CHANGES WHICH OCCURRED IN
BRITAIN AT THE CLOSE OF
SILURIAN TIMES.
Classification. The Silurian system was originally divided by its
founder, Sir R. I. Murchison, into three series, as follows:—
Ludlow Series
Wenlock "
Llandovery "

The term May Hill, proposed by Sedgwick, is sometimes used as


synonymous with Llandovery. This classification omits a somewhat
important set of beds intercalated between those of the Llandovery
and Wenlock series known as the Tarannon shales, and in Britain if
we were to classify afresh, it would be more convenient to include
some of the beds formerly referred to the Ludlow in the Wenlock. I
shall, however, adopt the old and well-established classification,
adding the term Tarannon to Llandovery, and speaking of the
Llandovery-Tarannon series. The nature of the two classifications is
shown in the following table:
Old New Palæontological
Stages.
Classification. Classification. Classification.
1 Upper Ludlow
2 Aymestry Downtonian
Ludlow
Limestone
3 Lower Ludlow
Fauna with
4 Wenlock
Encrinurus
Limestone
Salopian
5 Wenlock Shale Wenlock
6 Woolhope
Limestone
7 Tarannon
Shales
8 Upper Fauna with
Valentian
Llandovery Harpes
Llandovery
9 Lower
Llandovery
Fig. 18.

L = Ludlow. W = Wenlock. Ll-T = Llandovery-Tarannon.


Description of the strata. Lithologically the Silurian deposits of
Britain form a continuation of those of the Ordovician period, with a
local interruption due to the elevation of portions of Wales and the
Welsh borders at the close of Ordovician times. Elsewhere we find a
predominance of shales passing into grits at the top of the system,
the change indicating the incoming of the shallow-water phase
before the commencement of the second continental period.
Particular stress is laid upon the predominant shaley character of the
beds, for, on account of the richness and variety of the faunas of the
calcareous rocks, greater attention is naturally paid to them in
geological works, and the student may get a false idea of their
relative importance. An attempt is made below (Fig. 18) to give a
general idea of the variations in lithological characters of the Silurian
rocks in different parts of Britain.
The Silurian strata are mostly found in the same localities as
those which furnish exposures of the rocks of Ordovician age.
The development in the typical Silurian region of the Welsh
borders is characterised by the abundance of calcareous matter
which is found there as compared with that which exists in the other
British localities.
The Llandovery strata are sandy, often conglomeratic, with a fair
amount of calcareous matter in places. The arenaceous nature is
undoubtedly due to the proximity of land caused by local upheaval at
the end of Ordovician times, and the Upper Llandovery rocks
sometimes rest unconformably on the Lower ones, at other times on
Ordovician, Cambrian, or even Precambrian rocks. The Tarannon
shales are light green shales with intercalated grits. The Wenlock
series consists of a group of shales separating a lower, very
inconstant, earthy limestone from an upper, more constant, thicker
and purer limestone. The latter, the Wenlock limestone, is composed
of fragments and perfect specimens of various fossils, and the
fragmentary nature of many of the shells indicates the occurrence of
wave-action and probable formation in shallow water, in some places
against coral-reefs.
The Lower Ludlow beds consist of sandy shales; they are
separated from the Upper Ludlow beds by an impure limestone, the
Aymestry limestone. The Upper Ludlow beds consist mainly of grits
and flags, often coloured red towards the summit.
In North Wales the Llandovery beds occasionally present the
shelly arenaceous types of deposit as near Llangollen, at other times
as near Conway, Corwen, and in Anglesey, the graptolitic shale type.
They also rest unconformably upon the Ordovician rocks in this area.
The Tarannon shales resemble those of the border county. The
Wenlock series consists essentially of shales, while the Ludlow
development differs from that of the borders in its greater thickness
and the absence of any calcareous band in the centre. In Central
Wales the graptolitic type of the Llandovery-Tarannon series is found,
but the graptolite-bearing shales of the Llandovery epoch are thin
beds occurring between grits and flags no doubt deposited in
shallow water, and this division of the series is of very great
thickness.
In South Wales the Silurian rocks are very similar to those of the
Welsh borders, save that the calcareous deposits are fewer and
thinner.
The Lake District Silurian strata generally resemble those of
North Wales. The Llandovery-Tarannon rocks are of the graptolite-
shale type, intercalated with fine grits in the case of the beds of
Tarannon age. The Wenlock beds consist of shales, and the Ludlow
beds of gritty shales beneath, and massive flags and grits at the
summit. These Ludlow beds are here of great thickness (certainly
not less than 7000 feet) and were obviously accumulated for the
most part in shallow water.
The Llandovery-Tarannon rocks of Southern Scotland show the
two types which prevailed in the Moffat and Girvan areas in later
Ordovician times. The Llandovery beds of Moffat are known as the
Birkhill shales, and are very thin. The representatives of the
Tarannon shales, however, the Gala beds, consist mainly of grits, and
attain a great thickness. In the Girvan area, the Llandovery beds are
of the shelly type. Here as at Moffat and in the Lake District there is
perfect conformity between the beds of Ordovician and those of
Silurian age, and accordingly it is instructive to note the
completeness of the palæontological break, especially in the Moffat
district. The higher Silurian beds of Southern Scotland present a
general resemblance to those of North Wales and the Lake
District[80].
[80] For descriptions of the Silurian beds of the typical region see Lapworth
and Watts, Proc. Geol. Assoc., vol. XIII. p. 297, those of Wales are described by
Lake and Groom, Quart. Journ. Geol. Soc., vol. XLIX. p. 426, and Lake, ibid. vol.
LI. p. 9. A description of those of Lakeland will be found in the Memoir of the
Geological Survey "The Geology of the Country around Kendal, etc." while the
Scotch Rocks are described in Lapworth's papers on Moffat and Girvan.

On the European continent we find indications of conditions


similar to those which prevailed during the Ordovician period; the
strata become much thinner and more calcareous in Scandinavia,
and still thinner in the Baltic provinces of Russia, where they consist
very largely of calcareous matter. In central Europe the greater
abundance of calcareous matter, compared with that which is found
in the Ordovician strata of that region, points to a change in physical
conditions which became still more marked after Silurian times.
In North America, the succession is very similar to that of Britain,
the calcareous development of the Silurian rocks being found around
Niagara, but towards the close of Silurian times the shallow-water
phase became marked in places by the deposition of chemical
precipitates which indicate the separation of a portion of the late
Silurian ocean from the main mass during the period of formation of
these abnormal deposits.
The conditions of Silurian times, until the advent of the shallow-
water phase, recall those of Ordovician times and point to a wide
expanse of ocean at some distance from the land, though the
earliest deposits become arenaceous where they were deposited
against an old land surface formed by the elevation of the Welsh
Ordovician rocks, which were denuded to supply this material. One
marked difference existed between the physical conditions of our
area during Ordovician and Silurian times, for the volcanic activity
which was rife during Ordovician times almost ceased during Silurian
times, except in the region now occupied by the extreme south-west
of Ireland, and accordingly volcanic material does not appreciably
contribute to the formation of the Silurian deposits. The shallowness
of the sea-floor at times is marked by the occurrence of masses of
reef-building corals in the limestones, and these probably indicate
the prevalence of a fairly warm climate, an inference supported by
the nature of the Gastropod fauna of Gothland, as noticed in Chap.
IX.
The shallow-water phase commences fairly simultaneously over
the whole area at the beginning of the deposition of the Lower
Ludlow rocks, and becomes more marked in the Upper Ludlow rocks,
being most noticeable at their extreme summit, when a change
occurred which will be considered at the conclusion of this chapter.

The Silurian Faunas[81]. The Silurian period has been termed the
period of Crinoids, and this group of creatures certainly contained a
great variety of very remarkable forms, which are specially
numerous in the Wenlock Limestone of the Welsh borders, Gothland,
and North America, but many of the rocks of the system display few
traces of these organisms. The trilobites and graptolites still
contribute largely to the fauna, the latter becoming very scarce at
the summit of the system, though a few specimens have been
detected in the rocks of the succeeding system. The trilobites belong
to few genera though these are mostly more highly organised than
those of the Ordovician period. The genus Harpes has been taken as
fairly characteristic of the lower part of the system in Sweden, and it
occurs there abundantly in places in Britain, whilst Encrinurus is
more abundant in the upper series, but both of these genera range
from higher Ordovician beds into the Devonian. Mention has already
been made of the corals. Brachiopods are very abundant, and
Mollusca appear with considerable frequency. The appearance of
true insects is of importance, cockroaches have been recorded from
Silurian rocks and a number of other insects have lately been
recorded from Canada[82]. Eurypterids occur in considerable
abundance in the higher parts of the system, as do also the remains
of fish.
[81] For an account of the Silurian faunas the student may consult Sir R. I.
Murchison's Silurian System or the shorter Siluria and Lapworth's paper on the
Geological Distribution of the Rhabdophora.
[82] See an article by Dr G. F. Matthew, "Description of an extinct Palæozoic
Insect and a review of the Fauna with which it occurs," Bulletin XV. of the Natural
History Society of New Brunswick. The Silurian Rocks of the Little River Group of
St John, New Brunswick, have yielded species of land snails, two doubtful saw-
bugs, several arachnids, and myriopods, two insects of the order Thysanura
(Spring-tails), and eight Palæodictyoptera.

The close of Silurian times ushered in the second continental


period in Britain when a large part of our area and the adjoining
areas to the north and north-east were uplifted to form land, which
in the case of our area was interpenetrated by watery tracts, whose
exact nature is still a subject of dispute. Accordingly the deposits
which were formed during this period are local and in some cases
abnormal, but they will be considered in the next chapter.
Simultaneously with the formation of these deposits, uplift of the
sea-floor converted wider and wider areas into land, and this land
underwent considerable denudation, so that the tops of the
anticlines were worn away. The general trend of the anticlines was
east-north-east and west-south-west, and accordingly a series of
mountain chains possessed that direction, for the epeirogenic
movements were accompanied by orogenic ones. Between the
regions of uplifts were depressions in which sediments accumulated.
The principal axes of uplift in our area range through the North of
Scotland towards Scandinavia, across the Southern Scotch Uplands
to the North of Ireland, through the Lake District and through Wales.
As the result of lateral pressure, a cleavage structure was impressed
on many of the Lower Palæozoic rocks, the strike of the rocks
extended in the direction of the ridges and depressions, and the
rocks as a whole became considerably compacted and hardened,
thus producing one of the most important portions of the framework
of our island, for although the ancient mountain chains were largely
denuded during their elevation, and their stumps were afterwards
covered by later deposits, upon the removal of these, the ancient
stumps were once more exposed as fairly rigid masses which do not
yield greatly to denuding influences, and accordingly stand out as
the most important upland regions of Britain at the present day.
It is interesting to notice, as an illustration of the now well
established fact that successive earth movements often occur in the
same direction, that the axes of the folds produced during this
second continental (Devonian) period, run parallel with the lines
separating tracts of different lithological characters. It has been seen
that the Ordovician and Silurian rocks of the Southern Uplands
continue into Ireland, and that the beds of similar characters run in
belts having a general east-north-east and west-south-west trend,
which accordingly must have been the direction of the coast-line
parallel to which they were deposited, and as that coast-line was
due to uplift, the movement which produced it would naturally
produce foldings with east-north-east and west-south-west trend.
This is one of many cases where the lines separating belts of rock
having different lithological characters run parallel to axial lines of
folds which have been produced in the rocks at a later period.
As the result of the existence of land over parts of north-west
Europe in Devonian times, it is comparatively rare to find a passage
from normal Silurian rocks into normal Devonian ones; there is often
an unconformity above the Silurian strata. As we proceed
southwards towards central Europe, where the epeirogenic and
orogenic movements died out, this is not the case, and we get
complete conformity between marine sediments of the Silurian and
Devonian periods.

CHAPTER XVII.

THE DEVONIAN SYSTEM.


Classification. As a result of the movements which were briefly
described in the last chapter, two types of Devonian deposit are
found in the British Isles, and are called respectively the Devon type
and the Old Red Sandstone type. The latter rocks, formerly divided
into three divisions, are now separated into two only, the upper and
lower Old Red Sandstone, and the exact relation of these to the
different subdivisions of the rocks of Devon type remains to be
settled. The Devon type itself has given rise to much difference of
opinion, two local classifications have been applied, one for the rocks
of North Devon and another for those of South Devon. The
classification which has been most generally adopted is as follows:—

N. Devon. S. Devon[83].
Pilton Beds
Entomis Slates
Cucullæa
Upper Devonian Goniatite Limestones and
(Marwood) Beds
(Clymenian) Slates
Pickwell Down
Massive Limestones
Sandstone
Middle Devonian
Limestones
Middle Devonian Morte Slates
Ashprington Volcanic Series
(Eifelian) Ilfracombe Beds
Eifelian Slates and Shaly
Limestones
Hangman Grits Lower Devonian Slates
Lower Devonian
Lynton Slates Lincombe and Warberry
(Coblenzian)
Foreland Grits Grits and Meadfoot Sands
[83] An account of the South Devon rocks by Mr Ussher will be found in the
Quart. Journ. Geol. Soc., vol. XLVI. p. 487; from it the above classification of the
rocks of S. Devon is taken.

The division into Lower Middle and Upper Devonian is generally


adopted, though the alternative titles given to these divisions are not
always used with the same signification, and the distribution of the
different local stages given in the above classifications is usually
adopted in the main, though a detailed comparison of the Devonian
beds of North and South Devon is still attended with difficulty.
More than once an attempt has been made to prove that the
apparent succession of the North Devon rocks, which is that given in
the above table, is not the true one, and of recent years Dr Hicks
has obtained a number of fossils from the Morte Slates which had
hitherto yielded none, and he believes that these fossils indicate that
the Morte Slates are on a lower horizon than the beds on which they
rest. Whatever be the ultimate verdict, we can, at any rate, say that
the "Devonian Question," as it is termed, is not settled[84].
[84] See Hicks, H., "On the Morte Slates and Associated Beds in North Devon
and West Somerset," Quart. Journ. Geol. Soc., vols. LII. p. 254, LIII. p. 438.

Description of the Strata. The general variations in the lithological


characters of the deposits of Devonian age will be seen from the
accompanying figure which represents the deposits of Britain as they
occurred from north to south before they had been affected by
subsequent earth-movements (Fig. 19). The conventional signs
which are used are similar to those which have been used in other
parts of this work, and will save description of the section.
Fig. 19.
Lower Palæozoic and Precambrian
A.
Rocks.
N.S. North of Scotland
Central valley of Old Red Sandstone
C.V.
ditto Type.
W. Wales
N.D. North Devon
Devon Type.
S.D. South Devon

The ridges separate different deposits of Devonian rocks, which


were possibly deposited in isolated areas, though there was probably
connexion between them at any rate at times.
The Old Red Sandstone type consists to a large extent, as the
name implies, of sandstones which are coloured red by a deposit of
peroxide of iron around the sand grains. They are separable into a
lower and upper division with an unconformity often occurring
between them. The lower Old Red passes down in places into the
Silurian rocks with perfect conformity, and the upper Old Red
similarly passes up into the Carboniferous strata. The existence of
pebble beds at different horizons is a noteworthy feature. They are
frequently found at or near the base of the two divisions. The
sandstones of the lower division are often accompanied by
flagstones, while the red sandstones of the upper division usually
have deposits of yellow and brown sandstone intercalated between
them. Inconstant beds of limestone, known as cornstones, are found
in both divisions, and Prof. Sollas has shown that some of these, at
any rate, are true mechanical deposits, formed by the destruction of
pre-existing strata of limestone and the deposition of the resulting
fragments from a state of suspension. In Scotland a great thickness
of volcanic material of various kinds is associated with the two
divisions. For the sake of simplicity this is omitted from Fig. 19[85]. It
is not known how far normal sediments are associated with the Old
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!

ebookname.com

You might also like